chore: Follow up search on spaces tab

This commit is contained in:
Christian Pauly 2022-10-05 09:30:04 +02:00
parent 0687327601
commit 462fcea504

View File

@ -49,9 +49,15 @@ class ChatListViewBody extends StatelessWidget {
.where((s) => s.hasRoomUpdate)
.rateLimit(const Duration(seconds: 1)),
builder: (context, _) {
if (controller.waitForFirstSync &&
client.prevBatch != null &&
controller.activeFilter != ActiveFilter.spaces) {
if (controller.activeFilter == ActiveFilter.spaces &&
!controller.isSearchMode) {
return SpaceView(
controller,
scrollController: controller.scrollController,
key: Key(controller.activeSpaceId ?? 'Spaces'),
);
}
if (controller.waitForFirstSync && client.prevBatch != null) {
final rooms = controller.filteredRooms;
final displayStoriesHeader = {
ActiveFilter.allChats,
@ -210,13 +216,6 @@ class ChatListViewBody extends StatelessWidget {
},
);
}
if (controller.activeFilter == ActiveFilter.spaces) {
return SpaceView(
controller,
scrollController: controller.scrollController,
key: Key(controller.activeSpaceId ?? 'Spaces'),
);
}
const dummyChatCount = 5;
final titleColor =
Theme.of(context).textTheme.bodyText1!.color!.withAlpha(100);