[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

@@ -199,8 +199,17 @@ final class PlacePagePreviewViewController: UIViewController {
let stringTimeInterval = getTimeIntervalString(minutes: minutesUntilOpen)
let stringTime = stringFromTime(nextTimeOpen)
var state: String = L("closed_now")
var stateColor = UIColor.BaseColors.red
let details: String?
if (minutesUntilOpen < 3 * 60) // Less than 3 hours
if (minutesUntilOpen < 15) { // Less than 15 min
state = String(format: L("opens_in"), stringTimeInterval)
stateColor = UIColor.BaseColors.yellow
details = stringTime
}
else if (minutesUntilOpen < 3 * 60) // Less than 3 hours
{
details = String(format: L("opens_in"), stringTimeInterval) + "" + stringTime
}
@@ -222,8 +231,8 @@ final class PlacePagePreviewViewController: UIViewController {
details = nil
}
setScheduleLabel(state: L("closed_now"),
stateColor: UIColor.BaseColors.red,
setScheduleLabel(state: state,
stateColor: stateColor,
details: details)
@unknown default: