mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-05 11:58:32 +00:00
Avoid flashing the room list skeletons on launch
On a cold launch the home screen appeared just before the cached rooms published, briefly showing skeletons that were immediately replaced. The home screen now starts in a new awaitingCachedRooms mode, keeping the list blank while a cached room list is about to publish and falling back to the skeletons after 500ms. Without a cache the skeletons show straight away as before.
This commit is contained in:
@@ -219,7 +219,7 @@ struct HomeScreen_Previews: PreviewProvider, TestablePreview {
|
||||
let userID = "@alice:example.com"
|
||||
|
||||
let roomSummaryProviderState: RoomSummaryProviderMockConfigurationState = switch mode {
|
||||
case .skeletons:
|
||||
case .awaitingCachedRooms, .skeletons:
|
||||
.loading
|
||||
case .empty:
|
||||
.loaded([])
|
||||
|
||||
Reference in New Issue
Block a user