From e94bceeb908b6643954281fddfb2ba544cfc07d6 Mon Sep 17 00:00:00 2001 From: Povilas Staskus Date: Mon, 5 Dec 2022 21:10:51 +0200 Subject: [PATCH 1/3] Disable jetpackMigrationPreventDuplicateNotifications Feature Flag --- WordPress/Classes/Utility/BuildInformation/FeatureFlag.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPress/Classes/Utility/BuildInformation/FeatureFlag.swift b/WordPress/Classes/Utility/BuildInformation/FeatureFlag.swift index 5546bd0be35d..8c6ee6fef1d5 100644 --- a/WordPress/Classes/Utility/BuildInformation/FeatureFlag.swift +++ b/WordPress/Classes/Utility/BuildInformation/FeatureFlag.swift @@ -123,7 +123,7 @@ enum FeatureFlag: Int, CaseIterable, OverrideableFlag { case .newCoreDataContext: return true case .jetpackMigrationPreventDuplicateNotifications: - return true + return false case .jetpackFeaturesRemovalPhaseOne: return false case .jetpackFeaturesRemovalPhaseTwo: From ac5fc43fa736f770a959143e28172fd123b757e3 Mon Sep 17 00:00:00 2001 From: Povilas Staskus Date: Mon, 5 Dec 2022 21:11:31 +0200 Subject: [PATCH 2/3] Revert changes in RELEASE-NOTES.txt --- RELEASE-NOTES.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index 4a12142a3c59..799df12a3d2b 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -5,7 +5,6 @@ 21.3 ----- * [***] Adds a smooth, opt-in transition to the Jetpack app. [#19714] -* [*] [internal] When a user migrates to the Jetpack app and allows notifications, WordPress app notifications are disabled. This is released disabled and is behind a feature flag. [#19616, #19611, #19590] * [*] Fixed a minor UI issue where the segmented control under My SIte was being clipped when "Home" is selected. [#19595] * [*] Fixed an issue where the site wasn't removed and the app wasn't refreshed after disconnecting the site from WordPress.com. [#19634] * [*] [internal] Fixed an issue where Jetpack extensions were conflicting with WordPress extensions. [#19665] From 75c637f8e86d2114b373f3741cf247a22ca54c42 Mon Sep 17 00:00:00 2001 From: Povilas Staskus Date: Tue, 6 Dec 2022 15:39:10 +0200 Subject: [PATCH 3/3] Do not depend on remote feature flags --- .../Services/JetpackNotificationMigrationService.swift | 2 +- .../JetpackNotificationMigrationServiceTests.swift | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/WordPress/Classes/Services/JetpackNotificationMigrationService.swift b/WordPress/Classes/Services/JetpackNotificationMigrationService.swift index 420b72525aa1..d8f57b9a2560 100644 --- a/WordPress/Classes/Services/JetpackNotificationMigrationService.swift +++ b/WordPress/Classes/Services/JetpackNotificationMigrationService.swift @@ -22,7 +22,7 @@ final class JetpackNotificationMigrationService: JetpackNotificationMigrationSer private let jetpackNotificationMigrationDefaultsKey = "jetpackNotificationMigrationDefaultsKey" private var jetpackMigrationPreventDuplicateNotifications: Bool { - return featureFlagStore.value(for: FeatureFlag.jetpackMigrationPreventDuplicateNotifications) + return FeatureFlag.jetpackMigrationPreventDuplicateNotifications.enabled } var wordPressNotificationsEnabled: Bool { diff --git a/WordPress/WordPressTest/JetpackNotificationMigrationServiceTests.swift b/WordPress/WordPressTest/JetpackNotificationMigrationServiceTests.swift index b93ee0a1650c..0d36c36b22d8 100644 --- a/WordPress/WordPressTest/JetpackNotificationMigrationServiceTests.swift +++ b/WordPress/WordPressTest/JetpackNotificationMigrationServiceTests.swift @@ -138,7 +138,11 @@ private class RemoteNotificationRegisterMock: RemoteNotificationRegister { } private class RemoteFeatureFlagStoreMock: RemoteFeatureFlagStore { - var value = false + var value = false { + didSet { + try? FeatureFlagOverrideStore().override(FeatureFlag.jetpackMigrationPreventDuplicateNotifications, withValue: value) + } + } override func value(for flag: OverrideableFlag) -> Bool { return value