From 37e95aa22371bd05b016f79e80cb361b9fa9929e Mon Sep 17 00:00:00 2001 From: Marten Rebane <54431068+martenrebane@users.noreply.github.com> Date: Thu, 21 Mar 2024 15:55:05 +0200 Subject: [PATCH] Remove document share notification --- MoppApp/MoppApp/CryptoActions.swift | 7 +------ MoppApp/MoppApp/DefaultsHelper.swift | 10 ---------- .../UIViewController+Additions.swift | 20 ------------------- MoppApp/MoppApp/LocalizationKeys.swift | 2 -- .../SigningContainerViewController.swift | 4 ---- MoppApp/MoppApp/en.lproj/Localizable.strings | 2 -- MoppApp/MoppApp/et.lproj/Localizable.strings | 2 -- MoppApp/MoppApp/ru.lproj/Localizable.strings | 2 -- 8 files changed, 1 insertion(+), 48 deletions(-) diff --git a/MoppApp/MoppApp/CryptoActions.swift b/MoppApp/MoppApp/CryptoActions.swift index 335dc3dc..3d0a21d8 100644 --- a/MoppApp/MoppApp/CryptoActions.swift +++ b/MoppApp/MoppApp/CryptoActions.swift @@ -47,12 +47,7 @@ extension CryptoActions where Self: CryptoContainerViewController { self.notifications.append(encryptionSuccess) } self.reloadCryptoData() - - if !DefaultsHelper.hideShareContainerDialog { - DispatchQueue.main.asyncAfter(deadline: .now() + 2.0) { - self.displayShareContainerDialog() - } - } + MoppFileManager.removeFiles() }, diff --git a/MoppApp/MoppApp/DefaultsHelper.swift b/MoppApp/MoppApp/DefaultsHelper.swift index 11e61507..73b550e5 100644 --- a/MoppApp/MoppApp/DefaultsHelper.swift +++ b/MoppApp/MoppApp/DefaultsHelper.swift @@ -66,7 +66,6 @@ fileprivate let kSettingsDefaultSwitchKey = "kSettingsDefaultSwitchKey" fileprivate let kCrashReportSettingKey = "kCrashReportSettingKey" fileprivate let kPreviousPreferredLanguage = "kPreviousPreferredLanguage" fileprivate let kMoppLanguage = "kMoppLanguage" -fileprivate let kHideShareContainerDialog = "kHideShareContainerDialog" fileprivate let kIsTimestampedDdoc = "kIsTimestampedDdoc" fileprivate let kIsFileLoggingEnabled = "kIsFileLoggingEnabled" fileprivate let kIsFileLoggingRunning = "kIsFileLoggingRunning" @@ -205,15 +204,6 @@ class DefaultsHelper } } - class var hideShareContainerDialog: Bool { - set { - UserDefaults.standard.set(newValue, forKey: kHideShareContainerDialog) - } - get { - return UserDefaults.standard.bool(forKey: kHideShareContainerDialog) - } - } - class var isTimestampedDdoc: Bool { set { UserDefaults.standard.set(newValue, forKey: kIsTimestampedDdoc) diff --git a/MoppApp/MoppApp/Extensions/UIViewController+Additions.swift b/MoppApp/MoppApp/Extensions/UIViewController+Additions.swift index 7b8e7407..3f2e955a 100644 --- a/MoppApp/MoppApp/Extensions/UIViewController+Additions.swift +++ b/MoppApp/MoppApp/Extensions/UIViewController+Additions.swift @@ -84,26 +84,6 @@ extension UIViewController { return UIViewController() } - func displayShareContainerDialog() { - var dialogWaitTime: DispatchTime = DispatchTime.now() + 1 - if UIAccessibility.isVoiceOverRunning { - dialogWaitTime = DispatchTime.now() + 4 - } - DispatchQueue.main.asyncAfter(deadline: dialogWaitTime) { - let uiAlertController: UIAlertController = UIAlertController(title: L(.successNotificationDialogLabel), message: nil, preferredStyle: .alert) - - uiAlertController.addAction(UIAlertAction(title: L(.successNotificationDialogDontShowAgain), style: .default, handler: {(_: UIAlertAction) in - DefaultsHelper.hideShareContainerDialog = true - })) - - uiAlertController.addAction(UIAlertAction(title: L(.actionOk), style: .default, handler: {(_: UIAlertAction) in - self.dismiss(animated: true, completion: nil) - })) - - self.present(uiAlertController, animated: true, completion: nil) - } - } - func displayMessageDialog(message: String) { let uiAlertController: UIAlertController = UIAlertController(title: message, message: nil, preferredStyle: .alert) diff --git a/MoppApp/MoppApp/LocalizationKeys.swift b/MoppApp/MoppApp/LocalizationKeys.swift index b3d318f0..2f726f94 100644 --- a/MoppApp/MoppApp/LocalizationKeys.swift +++ b/MoppApp/MoppApp/LocalizationKeys.swift @@ -340,8 +340,6 @@ enum LocKey : String case refreshConfigurationRestartMessage = "refresh-configuration-restart-message" case refreshConfigurationUpdated = "refresh-configuration-updated" case refreshConfigurationAlreadyUpToDate = "refresh-configuration-already-up-to-date" - case successNotificationDialogLabel = "success-notification-dialog-label" - case successNotificationDialogDontShowAgain = "success-notification-dialog-dont-show-again" case infoAppVersion = "info-app-version" case infoAppIssuer = "info-app-issuer" case infoAppContact = "info-app-contact" diff --git a/MoppApp/MoppApp/SigningContainerViewController.swift b/MoppApp/MoppApp/SigningContainerViewController.swift index 61ccaa7e..eab5e63a 100644 --- a/MoppApp/MoppApp/SigningContainerViewController.swift +++ b/MoppApp/MoppApp/SigningContainerViewController.swift @@ -292,10 +292,6 @@ extension SigningContainerViewController : ContainerViewControllerDelegate { } } - if !DefaultsHelper.hideShareContainerDialog { - strongSelf.displayShareContainerDialog() - } - MoppFileManager.removeFiles() } diff --git a/MoppApp/MoppApp/en.lproj/Localizable.strings b/MoppApp/MoppApp/en.lproj/Localizable.strings index ee00edfb..e350c876 100755 --- a/MoppApp/MoppApp/en.lproj/Localizable.strings +++ b/MoppApp/MoppApp/en.lproj/Localizable.strings @@ -408,8 +408,6 @@ "refresh-configuration-updated" = "Configuration updated"; "refresh-configuration-already-up-to-date" = "Configuration is already up-to-date"; "save-diagnostics" = "SAVE DIAGNOSTICS"; -"success-notification-dialog-label" = "To share the container click the \"SHARE\" button and choose your preferred application. All containers can also be found in the application settings \"Recent Documents\" folder."; -"success-notification-dialog-dont-show-again" = "Don't show again"; // ** Info ** "info-app-version" = "RIA DigiDoc version"; diff --git a/MoppApp/MoppApp/et.lproj/Localizable.strings b/MoppApp/MoppApp/et.lproj/Localizable.strings index f9ef6420..36bea1cc 100755 --- a/MoppApp/MoppApp/et.lproj/Localizable.strings +++ b/MoppApp/MoppApp/et.lproj/Localizable.strings @@ -409,8 +409,6 @@ "refresh-configuration-updated" = "Konfiguratsioon uuendatud"; "refresh-configuration-already-up-to-date" = "Konfiguratsioon on juba ajakohane"; "save-diagnostics" = "SALVESTA DIAGNOSTIKA"; -"success-notification-dialog-label" = "Ümbriku jagamiseks klõpsa \"JAGA\" nupul ning vali soovitud rakendus. Kõik ümbrikud on leitavad ka rakenduse seadetes asuvas \"Hiljutised dokumendid\" kaustast."; -"success-notification-dialog-dont-show-again" = "Ära rohkem näita"; // ** Info ** "info-app-version" = "RIA DigiDoc versioon"; diff --git a/MoppApp/MoppApp/ru.lproj/Localizable.strings b/MoppApp/MoppApp/ru.lproj/Localizable.strings index 41bf9f82..bc2f4350 100644 --- a/MoppApp/MoppApp/ru.lproj/Localizable.strings +++ b/MoppApp/MoppApp/ru.lproj/Localizable.strings @@ -409,8 +409,6 @@ "refresh-configuration-updated" = "Конфигурация удачно обновлена"; "refresh-configuration-already-up-to-date" = "У вас последняя версия конфигурации"; "save-diagnostics" = "СОХРАНИТЬ ДИАГНОСТИКУ"; -"success-notification-dialog-label" = "Чтобы поделиться контейнером, нажмите кнопку «ПОДЕЛИТЬСЯ» и выберите нужное приложение. Все контейнеры можно найти в папке «Недавние документы» в настройках приложения."; -"success-notification-dialog-dont-show-again" = "Больше не показывать"; // ** Info ** "info-app-version" = "RIA DigiDoc версия";