mirror of
https://github.com/element-hq/element-x-ios.git
synced 2025-03-11 13:59:13 +00:00
Display the room list even if the room count is not exact (#800)
* Add log to know why HomeScreenViewModel.roomListMode is .skeletons To better understand issue #796 * Display the room list even if the room count is not exact This is a workaround for #796
This commit is contained in:
parent
1b5dfad607
commit
69e696afca
@ -73,7 +73,7 @@ class HomeScreenViewModel: HomeScreenViewModelType, HomeScreenViewModelProtocol
|
||||
.sink { [weak self] roomSummaryProviderState, totalCount, rooms in
|
||||
guard let self else { return }
|
||||
|
||||
let isLoadingData = roomSummaryProviderState != .fullyLoaded && (totalCount == 0 || rooms.count != totalCount)
|
||||
let isLoadingData = roomSummaryProviderState != .fullyLoaded && (totalCount == 0 || rooms.count < totalCount)
|
||||
let hasNoRooms = roomSummaryProviderState == .fullyLoaded && totalCount == 0
|
||||
|
||||
var roomListMode = self.state.roomListMode
|
||||
@ -92,6 +92,9 @@ class HomeScreenViewModel: HomeScreenViewModelType, HomeScreenViewModelProtocol
|
||||
self.state.roomListMode = roomListMode
|
||||
|
||||
MXLog.info("Received visibleRoomsSummaryProvider update, setting view room list mode to \"\(self.state.roomListMode)\"")
|
||||
if roomListMode == .skeletons {
|
||||
MXLog.info("roomSummaryProviderState: \(roomSummaryProviderState). rooms.count: \(rooms.count) / totalCount: \(totalCount)")
|
||||
}
|
||||
|
||||
// Delay user profile detail loading until after the initial room list loads
|
||||
if roomListMode == .rooms {
|
||||
|
@ -89,7 +89,7 @@ class RoomSummaryProvider: RoomSummaryProviderProtocol {
|
||||
|
||||
detectDuplicatesInRoomList(rooms)
|
||||
|
||||
MXLog.info("Finished applying \(diffs.count) diffs")
|
||||
MXLog.info("Finished applying \(diffs.count) diffs, new count: \(rooms.count)")
|
||||
}
|
||||
|
||||
private func buildRoomSummaryForIdentifier(_ identifier: String, invalidated: Bool) -> RoomSummary {
|
||||
|
1
changelog.d/796.bugfix
Normal file
1
changelog.d/796.bugfix
Normal file
@ -0,0 +1 @@
|
||||
Display the room list even if the room count is not exact.
|
Loading…
x
Reference in New Issue
Block a user