mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-20 05:13:58 +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
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user