Skip to content

Commit

Permalink
Merge pull request from GHSA-h4m7-pr8h-j7rf
Browse files Browse the repository at this point in the history
* Show alert when logged out due to missing biometric passcode

* Update copy

* Revert strings file change

* Update copy
  • Loading branch information
typfel committed Apr 16, 2021
1 parent 7d3ac49 commit 5ba3eb1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
6 changes: 6 additions & 0 deletions Wire-iOS/Generated/Strings+Generated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ internal enum L10n {
internal static let title = L10n.tr("Localizable", "about.website.title")
}
}
internal enum AccountDeletedMissingPasscodeAlert {
/// In order to use Wire, please set a passcode in your device settings.
internal static let message = L10n.tr("Localizable", "account_deleted_missing_passcode_alert.message")
/// No Device Passcode
internal static let title = L10n.tr("Localizable", "account_deleted_missing_passcode_alert.title")
}
internal enum AccountDeletedSessionExpiredAlert {
/// The application did not communicate with the server for a long period of time, or your session has been remotely invalidated.
internal static let message = L10n.tr("Localizable", "account_deleted_session_expired_alert.message")
Expand Down
3 changes: 3 additions & 0 deletions Wire-iOS/Resources/Base.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -1804,6 +1804,9 @@
"account_deleted_session_expired_alert.title" = "Your session expired";
"account_deleted_session_expired_alert.message" = "The application did not communicate with the server for a long period of time, or your session has been remotely invalidated.";

"account_deleted_missing_passcode_alert.title" = "No device passcode";
"account_deleted_missing_passcode_alert.message" = "In order to use Wire, please set a passcode in your device settings.";

// Button cell state
"button_message_cell.state.unselected" = "unselected";
"button_message_cell.state.selected" = "selected";
Expand Down
10 changes: 8 additions & 2 deletions Wire-iOS/Sources/AppRootRouter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,14 @@ extension AppRootRouter {

switch reason {
case .sessionExpired:
rootViewController.presentAlertWithOKButton(title: "account_deleted_session_expired_alert.title".localized,
message: "account_deleted_session_expired_alert.message".localized)
rootViewController.presentAlertWithOKButton(
title: L10n.Localizable.AccountDeletedSessionExpiredAlert.title,
message: L10n.Localizable.AccountDeletedSessionExpiredAlert.message)

case .biometricPasscodeNotAvailable:
rootViewController.presentAlertWithOKButton(
title: L10n.Localizable.AccountDeletedMissingPasscodeAlert.title,
message: L10n.Localizable.AccountDeletedMissingPasscodeAlert.message)

case .databaseWiped:
let wipeCompletionViewController = WipeCompletionViewController()
Expand Down

0 comments on commit 5ba3eb1

Please sign in to comment.