refactor: Migrate from pathsegment routing

This commit is contained in:
Krille 2023-08-13 16:07:15 +02:00
commit b715eff839
No known key found for this signature in database
15 changed files with 20 additions and 23 deletions

View file

@ -196,9 +196,9 @@ class ChatSettingsPopupMenuState extends State<ChatSettingsPopupMenu> {
void _showChatDetails() {
if (GoRouterState.of(context).uri.path.endsWith('/details')) {
context.go(['', 'rooms', widget.room.id].join('/'));
context.go('/rooms/${widget.room.id}');
} else {
context.go(['', 'rooms', widget.room.id, 'details'].join('/'));
context.go('/rooms/${widget.room.id}/details');
}
}
}

View file

@ -113,7 +113,7 @@ extension LocalNotificationsExtension on MatrixState {
room.setReadMarker(event.eventId, mRead: event.eventId);
break;
case DesktopNotificationActions.openChat:
context.go(['', 'rooms', room.id].join('/'));
context.go('/rooms/${room.id}');
break;
}
});

View file

@ -53,7 +53,7 @@ class PublicRoomBottomSheet extends StatelessWidget {
navigator.pop();
// don't open the room if the joined room is a space
if (!client.getRoomById(result.result!)!.isSpace) {
context.go(['', 'rooms', result.result!].join('/'));
context.go('/rooms/${result.result!}');
}
return;
}