This commit is contained in:
Thomas Ricouard 2023-01-08 11:37:02 +01:00
parent 874ea309ac
commit 7c19919190

View file

@ -155,9 +155,6 @@ struct IceCubesApp: App {
private func refreshPushSubs() {
PushNotifications.shared.requestPushNotifications()
Task {
await PushNotifications.shared.fetchSubscriptions(accounts: appAccountsManager.pushAccounts)
}
}
}
@ -171,6 +168,7 @@ class AppDelegate: NSObject, UIApplicationDelegate {
didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
PushNotifications.shared.pushToken = deviceToken
Task {
await PushNotifications.shared.fetchSubscriptions(accounts: AppAccountsManager.shared.pushAccounts)
await PushNotifications.shared.updateSubscriptions(accounts: AppAccountsManager.shared.pushAccounts)
}
}