diff --git a/Session/Meta/AppDelegate.swift b/Session/Meta/AppDelegate.swift index 15dac97e8..0dfefa7c5 100644 --- a/Session/Meta/AppDelegate.swift +++ b/Session/Meta/AppDelegate.swift @@ -381,7 +381,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD // Ensure we haven't timed out yet guard timer.isCancelled == false else { return } - /// Update the app badge in case the unread count changed + // Immediately cancel the timer to prevent the timeout being triggered + timer.cancel() + + // Update the app badge in case the unread count changed if let unreadCount: Int = dependencies[singleton: .storage].read({ db in try Interaction.fetchAppBadgeUnreadCount(db, using: dependencies)