MESSENGER-5279 call isAppversionOutdated after maintenance was updated

This commit is contained in:
Frank Rotermund
2024-01-09 16:08:24 +01:00
parent ac003c7942
commit 2bd95fac9a
4 changed files with 16 additions and 4 deletions

View File

@@ -250,6 +250,6 @@ Enable/disable the notifications for the selected room.
// bwi called by mastertabcontroller on pin login
- (void)checkAppVersionOutdated;
- (void)checkAppVersionDeprecated;
@end

View File

@@ -338,8 +338,6 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
{
[super viewDidAppear:animated];
[self checkAppVersionDeprecated];
// Release the current selected item (if any) except if the second view controller is still visible.
if (self.splitViewController.isCollapsed)
{
@@ -2526,6 +2524,11 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
[self presentViewController:errorAlert animated:YES completion:nil];
}
// bwi #5276: if outdated was shown but our app version is valid that means we have updated and have to reset outdated shown
if (BWIBuildSettings.shared.bwiCheckAppVersion && !appVersionsService.isCurrentAppVersionOutdated && appVersionsService.wasOutdatedAlertShown) {
[appVersionsService setOutdatedAlertShown:false];
}
}
-(void) logout {

View File

@@ -736,6 +736,10 @@ class AllChatsCoordinator: NSObject, SplitViewMasterCoordinatorProtocol {
} else {
UserDefaults.standard.set(false, forKey: "ServerDownTimeBlockingKey")
}
DispatchQueue.main.async {
self.allChatsViewController.checkAppVersionDeprecated()
self.allChatsViewController.checkAppVersionOutdated()
}
})
} else {
serverDownTime.fetchDowntimesWithDirectRequest { success in
@@ -746,6 +750,11 @@ class AllChatsCoordinator: NSObject, SplitViewMasterCoordinatorProtocol {
} else {
UserDefaults.standard.set(false, forKey: "ServerDownTimeBlockingKey")
}
DispatchQueue.main.async {
self.allChatsViewController.checkAppVersionDeprecated()
self.allChatsViewController.checkAppVersionOutdated()
}
}
}
}

View File

@@ -93,7 +93,7 @@ import Foundation
extension ValidAppVersionsDefaultService : ValidAppVersionsService {
@objc func isCurrentAppVersionOutdated() -> Bool {
return currentAppVersionState() == .outdated || currentAppVersionState() == .deprecated
return currentAppVersionState() == .outdated
}
@objc func isCurrentAppVersionDeprecated() -> Bool {