mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Add retry decryption encrypted timeline item debug menu option (#384)
* Fixed a couple of warnings (+2 squashed commits) Squashed commits: [21fbc3b0] Add changelog [abb092c6] Add retry decryption encrypted timeline item debug menu option * Cleanup room list state computations * Bump the RustSDK to v1.0.25-alpha * Fix brew CI errors: remove imagemagick and brew lock file entirely * Fix release script version bumping * Bump ruby dependencies
This commit is contained in:
@@ -79,14 +79,13 @@ class HomeScreenViewModel: HomeScreenViewModelType, HomeScreenViewModelProtocol
|
||||
visibleRoomsSummaryProvider.roomListPublisher)
|
||||
.receive(on: DispatchQueue.main)
|
||||
.sink { [weak self] state, totalCount, rooms in
|
||||
if state != .live {
|
||||
if totalCount == 0 || rooms.count != totalCount {
|
||||
self?.state.roomListMode = .skeletons
|
||||
} else {
|
||||
self?.state.roomListMode = .rooms
|
||||
}
|
||||
} else if totalCount == 0 {
|
||||
#warning("Empty state but it never happens because SS never goes into live for empty accounts")
|
||||
let isLoadingData = state != .live && (totalCount == 0 || rooms.count != totalCount)
|
||||
let hasNoRooms = state == .live && totalCount == 0
|
||||
|
||||
if isLoadingData {
|
||||
self?.state.roomListMode = .skeletons
|
||||
} else if hasNoRooms {
|
||||
self?.state.roomListMode = .skeletons
|
||||
} else {
|
||||
self?.state.roomListMode = .rooms
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user