Fix computing the time it takes to render the first rooms

This commit is contained in:
Stefan Ceriu
2023-08-29 09:20:14 +03:00
committed by Stefan Ceriu
parent 734d8bba04
commit b5c8676d95
3 changed files with 6 additions and 4 deletions
@@ -138,6 +138,8 @@ class HomeScreenViewModel: HomeScreenViewModelType, HomeScreenViewModelProtocol
return
}
ServiceLocator.shared.analytics.signpost.beginFirstRooms()
// Combine together the state and the room list to correctly compute the view state if
// data is present in the room list "cold cache"
Publishers.CombineLatest(roomSummaryProvider.statePublisher,
@@ -162,6 +164,10 @@ class HomeScreenViewModel: HomeScreenViewModelType, HomeScreenViewModelProtocol
return
}
if roomListMode == .rooms, self.state.roomListMode == .skeletons {
ServiceLocator.shared.analytics.signpost.endFirstRooms()
}
self.state.roomListMode = roomListMode
MXLog.info("Received room summary provider update, setting view room list mode to \"\(self.state.roomListMode)\"")