Fix #2652 - Room list looping and fighting scrolling after filtering

- also fixes filtering empty state vertical centering
This commit is contained in:
Stefan Ceriu
2024-04-23 12:16:10 +03:00
parent 23d5089287
commit 89927f1357
3 changed files with 46 additions and 23 deletions
@@ -121,6 +121,18 @@ struct HomeScreenViewState: BindableState {
var shouldShowEmptyFilterState: Bool {
!bindings.isSearchFieldFocused && bindings.filtersState.isFiltering && visibleRooms.isEmpty
}
var shouldShowFilters: Bool {
!bindings.isSearchFieldFocused
}
var shouldShowRecoveryKeyConfirmationBanner: Bool {
securityBannerMode == .recoveryKeyConfirmation
}
var shouldShowInvitesButton: Bool {
!ServiceLocator.shared.settings.roomListInvitesEnabled && hasPendingInvitations && !bindings.isSearchFieldFocused
}
}
struct HomeScreenViewStateBindings {