mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-26 11:30:50 +02:00
2809 force newest version
This commit is contained in:
committed by
Frank Rotermund
parent
d0203ecec4
commit
594b22ddab
@@ -309,6 +309,8 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
|
||||
{
|
||||
[super viewDidAppear:animated];
|
||||
|
||||
[self checkAppVersion];
|
||||
|
||||
// Release the current selected item (if any) except if the second view controller is still visible.
|
||||
if (self.splitViewController.isCollapsed)
|
||||
{
|
||||
@@ -2486,4 +2488,54 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
|
||||
|
||||
return [image vc_notRenderedImage];
|
||||
}
|
||||
|
||||
#pragma mark - Bwi Check App version
|
||||
|
||||
- (void)checkAppVersion {
|
||||
ValidAppVersionsDefaultService *appVersionsService = [[ValidAppVersionsDefaultService alloc] init];
|
||||
if( BuildSettings.bwiCheckAppVersion && appVersionsService.isCurrentAppVersionDeprecated ) {
|
||||
|
||||
MXWeakify(self);
|
||||
UIAlertController *errorAlert = [UIAlertController alertControllerWithTitle:[VectorL10n bwiOutdatedVersionWarningTitle]
|
||||
message:[VectorL10n bwiOutdatedVersionWarningMessage]
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
[errorAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n bwiOutdatedVersionAppstoreButton]
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action) {
|
||||
[self logout];
|
||||
[self gotoAppStore];
|
||||
|
||||
MXStrongifyAndReturnIfNil(self);
|
||||
self->currentAlert = nil;
|
||||
}]];
|
||||
|
||||
[errorAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n bwiOutdatedVersionLogoutButton]
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action) {
|
||||
[self logout];
|
||||
}]];
|
||||
|
||||
[self presentViewController:errorAlert animated:YES completion:nil];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
-(void) logout {
|
||||
[self startActivityIndicator];
|
||||
|
||||
MXWeakify(self);
|
||||
|
||||
[[AppDelegate theDelegate] logoutWithConfirmation:NO completion:^(BOOL isLoggedOut) {
|
||||
MXStrongifyAndReturnIfNil(self);
|
||||
|
||||
[self stopActivityIndicator];
|
||||
}];
|
||||
}
|
||||
|
||||
-(void) gotoAppStore {
|
||||
NSString *iTunesLink = @"itms://itunes.apple.com/app/BwMessenger/id1518548153?mt=8";
|
||||
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:iTunesLink] options:@{} completionHandler:nil];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user