mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2025-01-07 07:32:37 +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);
|
setState(() => _activeSpaceId = spaceId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void editSpace(BuildContext context, String spaceId) {
|
||||||
|
Scaffold.of(context).openEndDrawer();
|
||||||
|
VRouter.of(context).to('/rooms/$spaceId');
|
||||||
|
}
|
||||||
|
|
||||||
List<Room> get spaces =>
|
List<Room> get spaces =>
|
||||||
Matrix.of(context).client.rooms.where((r) => r.isSpace).toList();
|
Matrix.of(context).client.rooms.where((r) => r.isSpace).toList();
|
||||||
|
|
||||||
|
@ -348,6 +348,11 @@ class ChatListView extends StatelessWidget {
|
|||||||
title: Text(space.displayname),
|
title: Text(space.displayname),
|
||||||
onTap: () => controller.setActiveSpaceId(
|
onTap: () => controller.setActiveSpaceId(
|
||||||
context, space.id),
|
context, space.id),
|
||||||
|
trailing: IconButton(
|
||||||
|
icon: Icon(Icons.edit_outlined),
|
||||||
|
onPressed: () =>
|
||||||
|
controller.editSpace(context, space.id),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
Loading…
Reference in New Issue
Block a user