Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ actor SpaceHubSpacesStorage: SpaceHubSpacesStorageProtocol {
get async {
let combineStream = combineLatest(
participantSpacesStorage.activeOrLoadingParticipantSpacesPublisher.values,
await chatMessagesPreviewsStorage.previewsSequenceWithEmpty
await chatMessagesPreviewsStorage.previewsSequence
).throttle(milliseconds: 300)

return combineStream.map { (spaces, previews) in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ final class SpaceHubViewModel {
var dataLoaded = false
var searchText: String = ""
var filteredSpaces: [SpaceCardModel] = []
var animationsEnabled = false

var wallpapers: [String: SpaceWallpaperType] = [:]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ struct SpaceHubList: View {
Spacer.fixedHeight(40)
}
}
.animation(.default, value: model.filteredSpaces)
.animation(model.animationsEnabled ? .default : nil, value: model.filteredSpaces)
.onAppear { DispatchQueue.main.async { model.animationsEnabled = true } }
.onDisappear { model.animationsEnabled = false }
}

private var emptyStateView: some View {
Expand Down