|
|
|
|
@ -158,6 +158,11 @@ struct ContentView<T : AbstractTimer>: View { |
|
|
|
|
.sheet(isPresented: $boringContext.isShowingNewData, content: { |
|
|
|
|
self._newView(isPresented: $boringContext.isShowingNewData) |
|
|
|
|
.environment(\.managedObjectContext, viewContext) |
|
|
|
|
.onDisappear { |
|
|
|
|
withAnimation { |
|
|
|
|
self._buildItemsList() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
.toolbar { |
|
|
|
|
ToolbarItem(placement: .navigationBarTrailing) { |
|
|
|
|
@ -255,7 +260,7 @@ struct ContentView<T : AbstractTimer>: View { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
fileprivate func _askPermissions() { |
|
|
|
|
UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .sound]) { success, error in |
|
|
|
|
UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .sound, .criticalAlert]) { success, error in |
|
|
|
|
print("requestAuthorization > success = \(success), error = \(String(describing: error))") |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|