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) .where((s) => s.hasRoomUpdate)
.rateLimit(const Duration(seconds: 1)), .rateLimit(const Duration(seconds: 1)),
builder: (context, _) { builder: (context, _) {
if (controller.waitForFirstSync && if (controller.activeFilter == ActiveFilter.spaces &&
client.prevBatch != null && !controller.isSearchMode) {
controller.activeFilter != ActiveFilter.spaces) { return SpaceView(
controller,
scrollController: controller.scrollController,
key: Key(controller.activeSpaceId ?? 'Spaces'),
);
}
if (controller.waitForFirstSync && client.prevBatch != null) {
final rooms = controller.filteredRooms; final rooms = controller.filteredRooms;
final displayStoriesHeader = { final displayStoriesHeader = {
ActiveFilter.allChats, 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; const dummyChatCount = 5;
final titleColor = final titleColor =
Theme.of(context).textTheme.bodyText1!.color!.withAlpha(100); Theme.of(context).textTheme.bodyText1!.color!.withAlpha(100);