Debug dis message durations on for tests, uregister PNs on clear acct

• Turned on debug disappearing message settings by default for tests
• Unregister from PNs when clearing the account
pull/1061/head
Morgan Pretty 1 month ago
parent 3974723615
commit 25f3e836ef

@ -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;

@ -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)

@ -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(

Loading…
Cancel
Save