mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-17 23:18:27 +02:00
Merge branch 'feature/feature/5706_fix_alert_triggering_for_new_users' into 'develop'
MESSENGER-5706 fix alert triggering for new users See merge request bwmessenger/bundesmessenger/bundesmessenger-ios!329
This commit is contained in:
@@ -4631,6 +4631,9 @@ NSString *const AppDelegateUniversalLinkDidChangeNotification = @"AppDelegateUni
|
||||
{
|
||||
[secureBackupSetupCoordinatorBridgePresenter dismissWithAnimated:YES completion:nil];
|
||||
secureBackupSetupCoordinatorBridgePresenter = nil;
|
||||
|
||||
// BWI: #5706 fix alert triggering for new users
|
||||
[self afterAppUnlockedByPin:[UIApplication sharedApplication]];
|
||||
}
|
||||
|
||||
- (void)secureBackupSetupCoordinatorBridgePresenterDelegateDidCancel:(SecureBackupSetupCoordinatorBridgePresenter *)coordinatorBridgePresenter
|
||||
|
||||
@@ -767,7 +767,6 @@ class AllChatsCoordinator: NSObject, SplitViewMasterCoordinatorProtocol {
|
||||
checkMaintenanceStatus()
|
||||
enableMaintenanceTimer(true)
|
||||
|
||||
self.bwiCheckForMatomoPromt()
|
||||
BWIAnalytics.sharedTracker.readUserConfig()
|
||||
|
||||
if BWIBuildSettings.shared.bwiPersonalNotesRoom {
|
||||
@@ -775,7 +774,10 @@ class AllChatsCoordinator: NSObject, SplitViewMasterCoordinatorProtocol {
|
||||
}
|
||||
|
||||
// bwi #4478: refresh wellknown a bit more often
|
||||
self.currentMatrixSession?.refreshHomeserverWellknown(false, success: nil, failure: nil)
|
||||
self.currentMatrixSession?.refreshHomeserverWellknown(false, success: { _ in
|
||||
// bwi: #5706 fix crash: only show matomo alert when wellknown is available
|
||||
self.bwiCheckForMatomoPromt()
|
||||
}, failure: nil)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -800,7 +802,16 @@ extension AllChatsCoordinator: AllChatsViewControllerDelegate {
|
||||
func allChatsViewControllerDidCompleteAuthentication(_ allChatsViewController: AllChatsViewController) {
|
||||
self.delegate?.splitViewMasterCoordinatorDidCompleteAuthentication(self)
|
||||
|
||||
onBWIAppStart()
|
||||
// BWI: #5706 fix alert triggering for new users. Only trigger onBWIAppStart when session has recovery set
|
||||
guard let matrixSession = self.parameters.userSessionsService.mainUserSession?.matrixSession else {
|
||||
return
|
||||
}
|
||||
guard let crypto = matrixSession.crypto else {
|
||||
return
|
||||
}
|
||||
if crypto.recoveryService.hasRecovery() {
|
||||
onBWIAppStart()
|
||||
}
|
||||
}
|
||||
|
||||
func allChatsViewController(_ allChatsViewController: AllChatsViewController, didSelectRoomWithParameters roomNavigationParameters: RoomNavigationParameters, completion: @escaping () -> Void) {
|
||||
|
||||
@@ -325,6 +325,10 @@ class AllChatsViewController: HomeViewController {
|
||||
}
|
||||
|
||||
func presentFederationIntroductionSheet() {
|
||||
guard let mainSession = self.mainSession else {
|
||||
return
|
||||
}
|
||||
|
||||
guard BWIBuildSettings.shared.showFederationIntroduction else {
|
||||
return
|
||||
}
|
||||
@@ -333,7 +337,11 @@ class AllChatsViewController: HomeViewController {
|
||||
return
|
||||
}
|
||||
|
||||
guard self.mainSession.homeserverWellknown.shouldShowFederationIntroduction() else {
|
||||
guard let homeserverWellknown = mainSession.homeserverWellknown else {
|
||||
return
|
||||
}
|
||||
|
||||
guard homeserverWellknown.shouldShowFederationIntroduction() else {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -523,7 +531,15 @@ class AllChatsViewController: HomeViewController {
|
||||
|
||||
// bwi: 5706 show federation announcement promt
|
||||
func bwiCheckForFederationAnnouncementPromt() {
|
||||
guard self.mainSession.homeserverWellknown.shouldShowFederationAnnouncement() else {
|
||||
guard let mainSession = self.mainSession else {
|
||||
return
|
||||
}
|
||||
|
||||
guard let homeserverWellknown = mainSession.homeserverWellknown else {
|
||||
return
|
||||
}
|
||||
|
||||
guard homeserverWellknown.shouldShowFederationAnnouncement() else {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user