diff --git a/DuckDuckGo/Application/AppDelegate.swift b/DuckDuckGo/Application/AppDelegate.swift index 75d6901896..307d5f5ada 100644 --- a/DuckDuckGo/Application/AppDelegate.swift +++ b/DuckDuckGo/Application/AppDelegate.swift @@ -386,7 +386,8 @@ final class AppDelegate: NSObject, NSApplicationDelegate, FileDownloadManagerDel if isDataSyncingAvailable { self?.syncDidShowSyncPausedByFeatureFlagAlert = false } else if syncService?.authState == .active, self?.syncDidShowSyncPausedByFeatureFlagAlert == false { - let alert = NSAlert.dataSyncingDisabledByFeatureFlag() + let isSyncUIVisible = syncService?.featureFlags.contains(.userInterface) == true + let alert = NSAlert.dataSyncingDisabledByFeatureFlag(showLearnMore: isSyncUIVisible) let response = alert.runModal() self?.syncDidShowSyncPausedByFeatureFlagAlert = true diff --git a/DuckDuckGo/Common/Extensions/NSAlertExtension.swift b/DuckDuckGo/Common/Extensions/NSAlertExtension.swift index 9568eec5cc..628ddeddfc 100644 --- a/DuckDuckGo/Common/Extensions/NSAlertExtension.swift +++ b/DuckDuckGo/Common/Extensions/NSAlertExtension.swift @@ -221,13 +221,15 @@ extension NSAlert { return alert } - static func dataSyncingDisabledByFeatureFlag(upgradeRequired: Bool = false) -> NSAlert { + static func dataSyncingDisabledByFeatureFlag(showLearnMore: Bool, upgradeRequired: Bool = false) -> NSAlert { let alert = NSAlert() alert.messageText = UserText.syncPausedTitle alert.informativeText = upgradeRequired ? UserText.syncUnavailableMessageUpgradeRequired : UserText.syncUnavailableMessage alert.alertStyle = .warning alert.addButton(withTitle: UserText.ok) - alert.addButton(withTitle: UserText.learnMore) + if showLearnMore { + alert.addButton(withTitle: UserText.learnMore) + } return alert }