[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:
Matheus Gomes
2025-08-27 18:54:48 +02:00
committed by Yannik Bloscheck
parent a338a18590
commit c9de67762c
2 changed files with 22 additions and 6 deletions

View File

@@ -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: {