mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Sliding sync tweaks (#470)
* Show the splash screen again after failing to restore a session * Fix visible rooms cold cache not working. Construct the visibleRoomsView before calling the sliding sync builder, process invalid entries directly if the allRoomsView is not available * Stop building custom identifiers for invalidated rooms, we still have duplicates coming from filled ones. * Fix visibleItemRangePublisher debouncer, guard against changing the range while the view isn't "live" yet * Add more logs
This commit is contained in:
@@ -143,6 +143,7 @@ class AppCoordinator: AppCoordinatorProtocol {
|
||||
self.restoreUserSession()
|
||||
case (.restoringSession, .failedRestoringSession, .signedOut):
|
||||
self.showLoginErrorToast()
|
||||
self.presentSplashScreen(isSoftLogout: false)
|
||||
case (.restoringSession, .succeededRestoringSession, .signedIn):
|
||||
self.hideLoadingIndicator()
|
||||
self.setupUserSession()
|
||||
@@ -390,6 +391,8 @@ class AppCoordinator: AppCoordinatorProtocol {
|
||||
|
||||
@objc
|
||||
private func applicationWillResignActive() {
|
||||
MXLog.info("Application will resign active")
|
||||
|
||||
guard backgroundTask == nil else {
|
||||
return
|
||||
}
|
||||
@@ -404,6 +407,8 @@ class AppCoordinator: AppCoordinatorProtocol {
|
||||
|
||||
@objc
|
||||
private func applicationDidBecomeActive() {
|
||||
MXLog.info("Application did become active")
|
||||
|
||||
backgroundTask?.stop()
|
||||
backgroundTask = nil
|
||||
|
||||
@@ -416,6 +421,8 @@ class AppCoordinator: AppCoordinatorProtocol {
|
||||
private func observeNetworkState() {
|
||||
let reachabilityNotificationIdentifier = "io.element.elementx.reachability.notification"
|
||||
ServiceLocator.shared.networkMonitor.reachabilityPublisher.sink { reachable in
|
||||
MXLog.info("Reachability changed to \(reachable)")
|
||||
|
||||
if reachable {
|
||||
ServiceLocator.shared.userNotificationController.retractNotificationWithId(reachabilityNotificationIdentifier)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user