mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2025-02-17 14:30:40 +01:00
feat: Space settings route
This commit is contained in:
parent
e7044e0e67
commit
d487ddc05b
@ -46,6 +46,11 @@ class AppRoutes {
|
|||||||
path: '/rooms',
|
path: '/rooms',
|
||||||
widget: ChatList(),
|
widget: ChatList(),
|
||||||
stackedRoutes: [
|
stackedRoutes: [
|
||||||
|
VWidget(
|
||||||
|
path: '/spaces/:roomid',
|
||||||
|
widget: ChatDetails(),
|
||||||
|
stackedRoutes: _chatDetailsRoutes,
|
||||||
|
),
|
||||||
VWidget(path: ':roomid', widget: Chat(), stackedRoutes: [
|
VWidget(path: ':roomid', widget: Chat(), stackedRoutes: [
|
||||||
VWidget(
|
VWidget(
|
||||||
path: 'encryption',
|
path: 'encryption',
|
||||||
@ -103,6 +108,12 @@ class AppRoutes {
|
|||||||
widget: EmptyPage(),
|
widget: EmptyPage(),
|
||||||
buildTransition: _fadeTransition,
|
buildTransition: _fadeTransition,
|
||||||
stackedRoutes: [
|
stackedRoutes: [
|
||||||
|
VWidget(
|
||||||
|
path: '/spaces/:roomid',
|
||||||
|
widget: ChatDetails(),
|
||||||
|
buildTransition: _fadeTransition,
|
||||||
|
stackedRoutes: _chatDetailsRoutes,
|
||||||
|
),
|
||||||
VWidget(
|
VWidget(
|
||||||
path: '/newprivatechat',
|
path: '/newprivatechat',
|
||||||
widget: NewPrivateChat(),
|
widget: NewPrivateChat(),
|
||||||
|
@ -57,9 +57,10 @@ class ChatListController extends State<ChatList> {
|
|||||||
setState(() => _activeSpaceId = spaceId);
|
setState(() => _activeSpaceId = spaceId);
|
||||||
}
|
}
|
||||||
|
|
||||||
void editSpace(BuildContext context, String spaceId) {
|
void editSpace(BuildContext context, String spaceId) async {
|
||||||
Scaffold.of(context).openEndDrawer();
|
Scaffold.of(context).openEndDrawer();
|
||||||
VRouter.of(context).to('/rooms/$spaceId');
|
await Matrix.of(context).client.getRoomById(spaceId).postLoad();
|
||||||
|
VRouter.of(context).to('/spaces/$spaceId');
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Room> get spaces =>
|
List<Room> get spaces =>
|
||||||
|
@ -52,8 +52,11 @@ class ChatDetailsView extends StatelessWidget {
|
|||||||
SliverAppBar(
|
SliverAppBar(
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: Icon(Icons.close_outlined),
|
icon: Icon(Icons.close_outlined),
|
||||||
onPressed: () =>
|
onPressed: () => VRouter.of(context)
|
||||||
VRouter.of(context).to('/rooms/${controller.roomId}'),
|
.path
|
||||||
|
.startsWith('/spaces/')
|
||||||
|
? VRouter.of(context).pop()
|
||||||
|
: VRouter.of(context).to('/rooms/${controller.roomId}'),
|
||||||
),
|
),
|
||||||
elevation: Theme.of(context).appBarTheme.elevation,
|
elevation: Theme.of(context).appBarTheme.elevation,
|
||||||
expandedHeight: 300.0,
|
expandedHeight: 300.0,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user