mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-21 22:03:37 +00:00
[iOS] Add yellow color opening in up to 15 min
Fixes #1631. Signed-off-by: Matheus Gomes <matheusgomesms@noreply.codeberg.org>
This commit is contained in:
committed by
Yannik Bloscheck
parent
a338a18590
commit
c9de67762c
@@ -66,13 +66,20 @@
|
||||
}
|
||||
case osm::No: {
|
||||
const int minutes = result.GetMinutesUntilOpen();
|
||||
if (minutes < 60) { // less than 1 hour
|
||||
if (minutes < 15) { // less than 15 minutes
|
||||
_openStatusColor = [UIColor colorNamed:@"Base Colors/Yellow Color"];
|
||||
NSString * time = [NSString stringWithFormat:@"%d %@", minutes, L(@"minute")];
|
||||
_openStatusText = [NSString stringWithFormat:L(@"opens_in"), time];
|
||||
} else {
|
||||
}
|
||||
else if (minutes < 60) { // less than an hour (but more than 15 mins)
|
||||
_openStatusColor = [UIColor colorNamed:@"Base Colors/Red Color"];
|
||||
NSString * time = [NSString stringWithFormat:@"%d %@", minutes, L(@"minute")];
|
||||
_openStatusText = [NSString stringWithFormat:L(@"opens_in"), time];
|
||||
}
|
||||
else { // opens later or schedule is unknown
|
||||
_openStatusColor = [UIColor colorNamed:@"Base Colors/Red Color"];
|
||||
_openStatusText = L(@"closed");
|
||||
}
|
||||
_openStatusColor = [UIColor colorNamed:@"Base Colors/Red Color"];
|
||||
break;
|
||||
}
|
||||
case osm::Unknown: {
|
||||
|
||||
Reference in New Issue
Block a user