|
|
|
|
@ -18,7 +18,7 @@ struct CountdownLiveView: View { |
|
|
|
|
VStack { |
|
|
|
|
Text(countdown.activity?.name ?? "") |
|
|
|
|
if let dateInterval = environment.notificationDates[countdown.stringId] { |
|
|
|
|
Text(dateInterval.end, style: .timer) |
|
|
|
|
Text(dateInterval.end, style: .timer).monospaced() |
|
|
|
|
Button { |
|
|
|
|
CountdownScheduler.master.cancelCurrentNotifications(countdown: countdown) |
|
|
|
|
} label: { |
|
|
|
|
@ -26,7 +26,7 @@ struct CountdownLiveView: View { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
Text(countdown.duration.minuteSecond) |
|
|
|
|
Text(countdown.duration.minuteSecond).monospaced() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.font(.title2) |
|
|
|
|
@ -205,13 +205,6 @@ fileprivate extension Countdown { |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//private let itemFormatter: DateFormatter = { |
|
|
|
|
// let formatter = DateFormatter() |
|
|
|
|
// formatter.dateStyle = .short |
|
|
|
|
// formatter.timeStyle = .medium |
|
|
|
|
// return formatter |
|
|
|
|
//}() |
|
|
|
|
|
|
|
|
|
struct ContentView_Previews: PreviewProvider { |
|
|
|
|
static var previews: some View { |
|
|
|
|
ContentView().environment(\.managedObjectContext, PersistenceController.preview.container.viewContext) |
|
|
|
|
|