diff --git a/Session.xcodeproj/project.pbxproj b/Session.xcodeproj/project.pbxproj index bad236689..0cd4deb4c 100644 --- a/Session.xcodeproj/project.pbxproj +++ b/Session.xcodeproj/project.pbxproj @@ -7907,7 +7907,7 @@ CLANG_WARN__ARC_BRIDGE_CAST_NONARC = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 545; + CURRENT_PROJECT_VERSION = 546; ENABLE_BITCODE = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; @@ -7983,7 +7983,7 @@ CLANG_WARN__ARC_BRIDGE_CAST_NONARC = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "iPhone Distribution"; - CURRENT_PROJECT_VERSION = 545; + CURRENT_PROJECT_VERSION = 546; ENABLE_BITCODE = NO; ENABLE_MODULE_VERIFIER = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; diff --git a/Session/Settings/NukeDataModal.swift b/Session/Settings/NukeDataModal.swift index cbedd823e..5b37e6e17 100644 --- a/Session/Settings/NukeDataModal.swift +++ b/Session/Settings/NukeDataModal.swift @@ -279,14 +279,18 @@ final class NukeDataModal: Modal { } private func deleteAllLocalData() { - // Unregister push notifications if needed + /// Unregister push notifications if needed let isUsingFullAPNs: Bool = dependencies[defaults: .standard, key: .isUsingFullAPNs] let maybeDeviceToken: String? = dependencies[defaults: .standard, key: .deviceToken] - if isUsingFullAPNs, let deviceToken: String = maybeDeviceToken { - PushNotificationAPI - .unsubscribeAll(token: Data(hex: deviceToken), using: dependencies) - .sinkUntilComplete() + if isUsingFullAPNs { + UIApplication.shared.unregisterForRemoteNotifications() + + if let deviceToken: String = maybeDeviceToken { + PushNotificationAPI + .unsubscribeAll(token: Data(hex: deviceToken), using: dependencies) + .sinkUntilComplete() + } } /// Stop and cancel all current jobs (don't want to inadvertantly have a job store data after it's table has already been cleared) diff --git a/SessionUtilitiesKit/General/Feature.swift b/SessionUtilitiesKit/General/Feature.swift index 1d88e74d1..ce80acc77 100644 --- a/SessionUtilitiesKit/General/Feature.swift +++ b/SessionUtilitiesKit/General/Feature.swift @@ -25,7 +25,8 @@ public extension FeatureStorage { ) static let debugDisappearingMessageDurations: FeatureConfig<Bool> = Dependencies.create( - identifier: "debugDisappearingMessageDurations" + identifier: "debugDisappearingMessageDurations", + defaultOption: true // TODO: [GROUPS REBUILD] This should default to false ) static let updatedDisappearingMessages: FeatureConfig<Bool> = Dependencies.create(