mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-17 15:09:31 +02:00
Merge branch 'feature/5896_maintenance_before_server_selection' into 'develop'
fix: disable periodic maintenance on logout (MESSENGER-5896) See merge request bwmessenger/bundesmessenger/bundesmessenger-ios!392
This commit is contained in:
@@ -330,6 +330,8 @@ extension AppCoordinator: LegacyAppDelegateDelegate {
|
||||
|
||||
func legacyAppDelegate(_ legacyAppDelegate: LegacyAppDelegate!, didRemove account: MXKAccount!) {
|
||||
self.userSessionsService.removeUserSession(relatedToAccount: account)
|
||||
// bwi #5896 need logout info in allchatcoordnator
|
||||
self.splitViewCoordinator?.onLogout()
|
||||
}
|
||||
|
||||
func legacyAppDelegate(_ legacyAppDelegate: LegacyAppDelegate!, didNavigateToSpaceWithId spaceId: String!) {
|
||||
|
||||
@@ -224,6 +224,10 @@ class AllChatsCoordinator: NSObject, SplitViewMasterCoordinatorProtocol {
|
||||
appSateIndicator = nil
|
||||
}
|
||||
|
||||
func onLogout() {
|
||||
onBWILogout()
|
||||
}
|
||||
|
||||
// MARK: - SplitViewMasterPresentable
|
||||
|
||||
var selectedNavigationRouter: NavigationRouterType? {
|
||||
@@ -622,7 +626,7 @@ class AllChatsCoordinator: NSObject, SplitViewMasterCoordinatorProtocol {
|
||||
MXLog.warning("[AllChatsCoordinator] Unable to sign out due to missing current session.")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
let flowPresenter = SignOutFlowPresenter(session: session, presentingViewController: toPresentable())
|
||||
flowPresenter.delegate = self
|
||||
|
||||
@@ -778,6 +782,11 @@ class AllChatsCoordinator: NSObject, SplitViewMasterCoordinatorProtocol {
|
||||
self.bwiCheckForMatomoPromt()
|
||||
}, failure: nil)
|
||||
}
|
||||
|
||||
private func onBWILogout() {
|
||||
// bwi #5896 disable periodic maintenance fetching when user not logged in == No selected server to fetch from
|
||||
enableMaintenanceTimer(false)
|
||||
}
|
||||
}
|
||||
|
||||
extension AllChatsCoordinator: SignOutFlowPresenterDelegate {
|
||||
|
||||
@@ -171,6 +171,10 @@ final class SplitViewCoordinator: NSObject, SplitViewCoordinatorType {
|
||||
func showAppStateIndicator(with text: String, icon: UIImage?) {
|
||||
masterCoordinator?.showAppStateIndicator(with: text, icon: icon)
|
||||
}
|
||||
|
||||
func onLogout() {
|
||||
masterCoordinator?.onLogout()
|
||||
}
|
||||
|
||||
// MARK: - Private methods
|
||||
|
||||
|
||||
@@ -48,4 +48,7 @@ protocol SplitViewCoordinatorType: Coordinator, Presentable {
|
||||
|
||||
/// Hide the message related to the application state currently displayed.
|
||||
func hideAppStateIndicator()
|
||||
|
||||
/// remove maintenace timer
|
||||
func onLogout()
|
||||
}
|
||||
|
||||
@@ -49,4 +49,7 @@ protocol SplitViewMasterCoordinatorProtocol: Coordinator, SplitViewMasterPresent
|
||||
|
||||
/// Hide the message related to the application state currently displayed.
|
||||
func hideAppStateIndicator()
|
||||
|
||||
/// clear maintenance timer
|
||||
func onLogout()
|
||||
}
|
||||
|
||||
@@ -244,6 +244,10 @@ final class TabBarCoordinator: NSObject, SplitViewMasterCoordinatorProtocol {
|
||||
appSateIndicator = nil
|
||||
}
|
||||
|
||||
func onLogout() {
|
||||
|
||||
}
|
||||
|
||||
// MARK: - SplitViewMasterPresentable
|
||||
|
||||
var selectedNavigationRouter: NavigationRouterType? {
|
||||
|
||||
Reference in New Issue
Block a user