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:
Stefan Ceriu
2022-12-22 13:59:38 +02:00
committed by GitHub
parent 131197b7d7
commit ac77743c7a
23 changed files with 117 additions and 266 deletions
@@ -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
}