mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-09 17:37:43 +02:00
Merge branch 'feature/4933_appversion_check_on_login' into 'develop'
MESSENGER-4933 appversion check on login See merge request bwmessenger/bundesmessenger/bundesmessenger-ios!220
This commit is contained in:
@@ -134,4 +134,6 @@ enum AuthenticationLoginErrorType: Hashable {
|
||||
case invalidHomeserver
|
||||
/// The response from the homeserver was unexpected.
|
||||
case unknown
|
||||
/// Appversion is too old
|
||||
case appVersion
|
||||
}
|
||||
|
||||
@@ -80,6 +80,16 @@ class AuthenticationLoginViewModel: AuthenticationLoginViewModelType, Authentica
|
||||
message: VectorL10n.authenticationServerSelectionGenericError)
|
||||
case .unknown:
|
||||
state.bindings.alertInfo = AlertInfo(id: type)
|
||||
case .appVersion:
|
||||
state.bindings.alertInfo = AlertInfo(id: type,
|
||||
title: BWIL10n.bwiDeprecatedVersionWarningTitle,
|
||||
message: BWIL10n.bwiDeprecatedVersionWarningMessage,
|
||||
primaryButton: (BWIL10n.bwiDeprecatedVersionAppstoreButton, {
|
||||
|
||||
UIApplication.shared.open(URL(string: BWIBuildSettings.shared.itunesAppLink)!)
|
||||
}),
|
||||
secondaryButton: (VectorL10n.ok, {}))
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+5
-1
@@ -130,7 +130,11 @@ final class AuthenticationLoginCoordinator: Coordinator, Presentable {
|
||||
self.showForgotPasswordScreen()
|
||||
}
|
||||
case .login(let username, let password):
|
||||
self.login(username: username, password: password)
|
||||
if BWIBuildSettings.shared.bwiCheckAppVersion && ValidAppVersionsDefaultService().isCurrentAppVersionDeprecated() {
|
||||
authenticationLoginViewModel.displayError(.appVersion)
|
||||
} else {
|
||||
self.login(username: username, password: password)
|
||||
}
|
||||
case .continueWithSSO(let identityProvider):
|
||||
self.callback?(.continueWithSSO(identityProvider))
|
||||
case .fallback:
|
||||
|
||||
Reference in New Issue
Block a user