11import 'package:flutter/material.dart' ;
2- import 'package:future_loading_dialog/future_loading_dialog.dart' ;
32import 'package:watch_it/watch_it.dart' ;
43import 'package:yaru/yaru.dart' ;
54
@@ -25,10 +24,6 @@ class ChatMasterSidePanel extends StatelessWidget with WatchItMixin {
2524 Widget build (BuildContext context) {
2625 final l10n = context.l10n;
2726 final searchActive = watchPropertyValue ((SearchModel m) => m.searchActive);
28- final archiveActive = watchPropertyValue ((ChatModel m) => m.archiveActive);
29-
30- final roomsFilter = watchPropertyValue ((ChatModel m) => m.roomsFilter);
31- final chatModel = di <ChatModel >();
3227
3328 return Material (
3429 color: getPanelBg (context.theme),
@@ -37,9 +32,18 @@ class ChatMasterSidePanel extends StatelessWidget with WatchItMixin {
3732 const ChatMasterTitleBar (),
3833 if (searchActive) const ChatRoomsSearchField (),
3934 const ChatMasterListFilterBar (),
40- if (roomsFilter == RoomsFilter .spaces && ! archiveActive)
41- const ChatSpaceFilter (),
42- const Expanded (child: ChatRoomsList ()),
35+ Expanded (
36+ child: Row (
37+ children: [
38+ ChatSpaceFilter (
39+ show: watchPropertyValue (
40+ (ChatModel m) => m.roomsFilter == RoomsFilter .spaces,
41+ ),
42+ ),
43+ const Expanded (child: ChatRoomsList ()),
44+ ],
45+ ),
46+ ),
4347 Padding (
4448 padding: const EdgeInsets .symmetric (vertical: kMediumPadding),
4549 child: Stack (
@@ -53,19 +57,6 @@ class ChatMasterSidePanel extends StatelessWidget with WatchItMixin {
5357 builder: (context) => const ChatSettingsDialog (),
5458 ),
5559 ),
56- Positioned (
57- right: kMediumPadding,
58- child: IconButton (
59- tooltip: context.l10n.archive,
60- selectedIcon: const Icon (YaruIcons .trash_filled),
61- isSelected: archiveActive,
62- onPressed: () => showFutureLoadingDialog (
63- context: context,
64- future: chatModel.toggleArchive,
65- ),
66- icon: const Icon (YaruIcons .trash),
67- ),
68- ),
6960 ],
7061 ),
7162 ),
0 commit comments