mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-01 13:46:57 +02:00
Feature/2854 version management
This commit is contained in:
@@ -337,7 +337,7 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
|
||||
{
|
||||
[super viewDidAppear:animated];
|
||||
|
||||
[self checkAppVersion];
|
||||
[self checkAppVersionDeprecated];
|
||||
|
||||
// Release the current selected item (if any) except if the second view controller is still visible.
|
||||
if (self.splitViewController.isCollapsed)
|
||||
@@ -2610,16 +2610,16 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
|
||||
|
||||
#pragma mark - Bwi Check App version
|
||||
|
||||
- (void)checkAppVersion {
|
||||
- (void)checkAppVersionDeprecated {
|
||||
ValidAppVersionsDefaultService *appVersionsService = [[ValidAppVersionsDefaultService alloc] init];
|
||||
if( BwiBuildSettings.bwiCheckAppVersion && appVersionsService.isCurrentAppVersionDeprecated ) {
|
||||
|
||||
MXWeakify(self);
|
||||
UIAlertController *errorAlert = [UIAlertController alertControllerWithTitle:[VectorL10n bwiOutdatedVersionWarningTitle]
|
||||
message:[VectorL10n bwiOutdatedVersionWarningMessage]
|
||||
message:[VectorL10n bwiDeprecatedVersionWarningMessage]
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
[errorAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n bwiOutdatedVersionAppstoreButton]
|
||||
[errorAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n bwiDeprecatedVersionAppstoreButton]
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action) {
|
||||
[self logout];
|
||||
@@ -2636,7 +2636,35 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
|
||||
}]];
|
||||
|
||||
[self presentViewController:errorAlert animated:YES completion:nil];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)checkAppVersionOutdated {
|
||||
ValidAppVersionsDefaultService *appVersionsService = [[ValidAppVersionsDefaultService alloc] init];
|
||||
if (BwiBuildSettings.bwiCheckAppVersion && appVersionsService.isCurrentAppVersionOutdated && !appVersionsService.wasOutdatedAlertShown) {
|
||||
MXWeakify(self);
|
||||
UIAlertController *errorAlert = [UIAlertController alertControllerWithTitle:[VectorL10n bwiOutdatedVersionWarningTitle]
|
||||
message:[VectorL10n bwiOutdatedVersionWarningMessage:AppInfo.current.displayName]
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
[errorAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n bwiOutdatedVersionAppstoreButton]
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action) {
|
||||
|
||||
[self gotoAppStore];
|
||||
[appVersionsService setOutdatedAlertShown:true];
|
||||
|
||||
MXStrongifyAndReturnIfNil(self);
|
||||
self->currentAlert = nil;
|
||||
}]];
|
||||
|
||||
[errorAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n bwiOutdatedVersionLogoutButton]
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action) {
|
||||
[appVersionsService setOutdatedAlertShown:true];
|
||||
}]];
|
||||
|
||||
[self presentViewController:errorAlert animated:YES completion:nil];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user