Skip to content

Commit

Permalink
migrate profile-muting from UserDefaults to DcContext
Browse files Browse the repository at this point in the history
  • Loading branch information
r10s committed Jul 25, 2024
1 parent 7d70cd5 commit d1642d4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions deltachat-ios/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,15 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
dcAccounts.openDatabase(writeable: true)
migrateToDcAccounts()

// migrating global notifications pref. to per-account config, added 2024-07, can be removed after some time
if UserDefaults.standard.bool(forKey: "notifications_disabled") {
for accountId in dcAccounts.getAll() {
dcAccounts.get(id: accountId).setMuted(true)
}
UserDefaults.standard.removeObject(forKey: "notifications_disabled")
}
// /migrating global notifications

self.launchOptions = launchOptions
continueDidFinishLaunchingWithOptions()
return true
Expand Down

0 comments on commit d1642d4

Please sign in to comment.