mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-18 01:49:50 +01:00
feat: Implement basic space editing
This commit is contained in:
parent
77fd7a811c
commit
2ebefddbe0
@ -48,6 +48,11 @@ class ChatListController extends State<ChatList> {
|
||||
setState(() => _activeSpaceId = spaceId);
|
||||
}
|
||||
|
||||
void editSpace(BuildContext context, String spaceId) {
|
||||
Scaffold.of(context).openEndDrawer();
|
||||
VRouter.of(context).to('/rooms/$spaceId');
|
||||
}
|
||||
|
||||
List<Room> get spaces =>
|
||||
Matrix.of(context).client.rooms.where((r) => r.isSpace).toList();
|
||||
|
||||
|
@ -348,6 +348,11 @@ class ChatListView extends StatelessWidget {
|
||||
title: Text(space.displayname),
|
||||
onTap: () => controller.setActiveSpaceId(
|
||||
context, space.id),
|
||||
trailing: IconButton(
|
||||
icon: Icon(Icons.edit_outlined),
|
||||
onPressed: () =>
|
||||
controller.editSpace(context, space.id),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
Loading…
Reference in New Issue
Block a user