mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +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:
@@ -73,7 +73,7 @@ class HomeScreenViewModel: HomeScreenViewModelType, HomeScreenViewModelProtocol
|
|||||||
.sink { [weak self] roomSummaryProviderState, totalCount, rooms in
|
.sink { [weak self] roomSummaryProviderState, totalCount, rooms in
|
||||||
guard let self else { return }
|
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
|
let hasNoRooms = roomSummaryProviderState == .fullyLoaded && totalCount == 0
|
||||||
|
|
||||||
var roomListMode = self.state.roomListMode
|
var roomListMode = self.state.roomListMode
|
||||||
@@ -92,6 +92,9 @@ class HomeScreenViewModel: HomeScreenViewModelType, HomeScreenViewModelProtocol
|
|||||||
self.state.roomListMode = roomListMode
|
self.state.roomListMode = roomListMode
|
||||||
|
|
||||||
MXLog.info("Received visibleRoomsSummaryProvider update, setting view room list mode to \"\(self.state.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
|
// Delay user profile detail loading until after the initial room list loads
|
||||||
if roomListMode == .rooms {
|
if roomListMode == .rooms {
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ class RoomSummaryProvider: RoomSummaryProviderProtocol {
|
|||||||
|
|
||||||
detectDuplicatesInRoomList(rooms)
|
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 {
|
private func buildRoomSummaryForIdentifier(_ identifier: String, invalidated: Bool) -> RoomSummary {
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
Display the room list even if the room count is not exact.
|
||||||
Reference in New Issue
Block a user