mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Fix the room list spasming when reaching the top after having scrolled down
This commit is contained in:
@@ -52,16 +52,28 @@ struct HomeScreenContent: View {
|
|||||||
.layoutPriority(1)
|
.layoutPriority(1)
|
||||||
}
|
}
|
||||||
case .rooms:
|
case .rooms:
|
||||||
LazyVStack(spacing: 0, pinnedViews: [.sectionHeaders]) {
|
if context.viewState.shouldShowFilters {
|
||||||
Section {
|
// Showing empty views in pinned headers makes the room list spasm when reaching the top
|
||||||
HomeScreenRoomList(context: context)
|
LazyVStack(spacing: 0, pinnedViews: [.sectionHeaders]) {
|
||||||
} header: {
|
Section {
|
||||||
topSection
|
HomeScreenRoomList(context: context)
|
||||||
|
} header: {
|
||||||
|
topSection
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
.searchable(text: $context.searchQuery)
|
||||||
|
.compoundSearchField()
|
||||||
|
.disableAutocorrection(true)
|
||||||
|
} else {
|
||||||
|
topSection
|
||||||
|
|
||||||
|
LazyVStack(spacing: 0) {
|
||||||
|
HomeScreenRoomList(context: context)
|
||||||
|
}
|
||||||
|
.searchable(text: $context.searchQuery)
|
||||||
|
.compoundSearchField()
|
||||||
|
.disableAutocorrection(true)
|
||||||
}
|
}
|
||||||
.searchable(text: $context.searchQuery)
|
|
||||||
.compoundSearchField()
|
|
||||||
.disableAutocorrection(true)
|
|
||||||
case .migration:
|
case .migration:
|
||||||
EmptyView()
|
EmptyView()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user