Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove document share notification #482

Merged
merged 1 commit into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions MoppApp/MoppApp/CryptoActions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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()

},
Expand Down
10 changes: 0 additions & 10 deletions MoppApp/MoppApp/DefaultsHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down
20 changes: 0 additions & 20 deletions MoppApp/MoppApp/Extensions/UIViewController+Additions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 0 additions & 2 deletions MoppApp/MoppApp/LocalizationKeys.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 0 additions & 4 deletions MoppApp/MoppApp/SigningContainerViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,6 @@ extension SigningContainerViewController : ContainerViewControllerDelegate {
}
}

if !DefaultsHelper.hideShareContainerDialog {
strongSelf.displayShareContainerDialog()
}

MoppFileManager.removeFiles()
}

Expand Down
2 changes: 0 additions & 2 deletions MoppApp/MoppApp/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
2 changes: 0 additions & 2 deletions MoppApp/MoppApp/et.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
2 changes: 0 additions & 2 deletions MoppApp/MoppApp/ru.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -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 версия";
Expand Down