feat: Implement basic space editing

This commit is contained in:
Christian Pauly 2021-08-01 07:54:44 +02:00
parent 77fd7a811c
commit 2ebefddbe0
2 changed files with 10 additions and 0 deletions

View File

@ -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();

View File

@ -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),
),
);
},
),