|
|
|
@ -27,6 +27,11 @@ struct ContentView<T : AbstractTimer>: View { |
|
|
|
@State private var showStatsSheet: Bool = false |
|
|
|
@State private var showStatsSheet: Bool = false |
|
|
|
@State private var showSubscriptionSheet: Bool = false |
|
|
|
@State private var showSubscriptionSheet: Bool = false |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@FetchRequest( |
|
|
|
|
|
|
|
sortDescriptors: [NSSortDescriptor(keyPath: \AbstractTimer.order, ascending: true)], |
|
|
|
|
|
|
|
animation: .default) |
|
|
|
|
|
|
|
private var timers: FetchedResults<AbstractTimer> |
|
|
|
|
|
|
|
|
|
|
|
var body: some View { |
|
|
|
var body: some View { |
|
|
|
|
|
|
|
|
|
|
|
VStack { |
|
|
|
VStack { |
|
|
|
@ -56,7 +61,7 @@ struct ContentView<T : AbstractTimer>: View { |
|
|
|
.foregroundColor(.black) |
|
|
|
.foregroundColor(.black) |
|
|
|
.background(self._backgroundColor) |
|
|
|
.background(self._backgroundColor) |
|
|
|
.cornerRadius(32.0, corners: [.topRight, .topLeft]) |
|
|
|
.cornerRadius(32.0, corners: [.topRight, .topLeft]) |
|
|
|
} else if let tip = self.showTip { |
|
|
|
} else if let tip = self.showTip, self.timers.count > 0 { |
|
|
|
TipView(tip: tip) { |
|
|
|
TipView(tip: tip) { |
|
|
|
Preferences.lastShownTip = tip.rawValue |
|
|
|
Preferences.lastShownTip = tip.rawValue |
|
|
|
self.showTip = nil |
|
|
|
self.showTip = nil |
|
|
|
|