diff --git a/ElementX/Sources/Application/AppCoordinator.swift b/ElementX/Sources/Application/AppCoordinator.swift index 129b7984b..2f21517fe 100644 --- a/ElementX/Sources/Application/AppCoordinator.swift +++ b/ElementX/Sources/Application/AppCoordinator.swift @@ -74,8 +74,6 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationCoordinatorDelegate, navigationRootCoordinator = NavigationRootCoordinator() Self.setupServiceLocator(navigationRootCoordinator: navigationRootCoordinator, appSettings: appSettings) - - ServiceLocator.shared.analytics.signpost.beginFirstRooms() ServiceLocator.shared.analytics.startIfEnabled() diff --git a/ElementX/Sources/Screens/HomeScreen/HomeScreenViewModel.swift b/ElementX/Sources/Screens/HomeScreen/HomeScreenViewModel.swift index cfcde87b7..50d5e0874 100644 --- a/ElementX/Sources/Screens/HomeScreen/HomeScreenViewModel.swift +++ b/ElementX/Sources/Screens/HomeScreen/HomeScreenViewModel.swift @@ -162,11 +162,6 @@ class HomeScreenViewModel: HomeScreenViewModelType, HomeScreenViewModelProtocol return } - // End the initial sync performance timing once the room list is about to be displayed. - if roomListMode == .rooms, self.state.roomListMode == .skeletons { - analytics.signpost.endFirstRooms() - } - self.state.roomListMode = roomListMode MXLog.info("Received room summary provider update, setting view room list mode to \"\(self.state.roomListMode)\"") diff --git a/ElementX/Sources/Services/Room/RoomSummary/RoomSummaryProvider.swift b/ElementX/Sources/Services/Room/RoomSummary/RoomSummaryProvider.swift index e61b5b7b6..028b16538 100644 --- a/ElementX/Sources/Services/Room/RoomSummary/RoomSummaryProvider.swift +++ b/ElementX/Sources/Services/Room/RoomSummary/RoomSummaryProvider.swift @@ -66,6 +66,8 @@ class RoomSummaryProvider: RoomSummaryProviderProtocol { self.appSettings = appSettings self.backgroundTaskService = backgroundTaskService + ServiceLocator.shared.analytics.signpost.beginFirstRooms() + diffsPublisher .receive(on: serialDispatchQueue) .sink { [weak self] in self?.updateRoomsWithDiffs($0) } @@ -154,6 +156,8 @@ class RoomSummaryProvider: RoomSummaryProviderProtocol { detectDuplicatesInRoomList(rooms) MXLog.verbose("\(name): Finished applying \(diffs.count) diffs, new room list \(rooms.compactMap { $0.id ?? "Empty" })") + + ServiceLocator.shared.analytics.signpost.endFirstRooms() } private func processDiff(_ diff: RoomListEntriesUpdate, on currentItems: [RoomSummary]) -> [RoomSummary] {