Add notification mode setting

This allows the user to switch between local and push notifications

Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
Reviewed-by: William Casarin <jb55@jb55.com>
This commit is contained in:
Daniel D’Aquino
2024-05-15 16:47:16 -07:00
parent 5a68cfa448
commit 0a9bcb6189
6 changed files with 54 additions and 5 deletions

View File

@@ -73,7 +73,7 @@ class AppDelegate: NSObject, UIApplicationDelegate, UNUserNotificationCenterDele
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
// Return if this feature is disabled
guard let settings = self.settings else { return }
if !settings.enable_experimental_push_notifications {
if !settings.enable_experimental_push_notifications || settings.notifications_mode == .local {
return
}