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

@ -312,8 +312,7 @@ class BackgroundPush {
?.content
.tryGet<String>('type') ==
ClientStoriesExtension.storiesRoomType;
FluffyChatApp.router
.go(['', isStory ? 'stories' : 'rooms', roomId].join('/'));
FluffyChatApp.router.go('/${isStory ? 'stories' : 'rooms'}/$roomId');
} catch (e, s) {
Logs().e('[Push] Failed to open room', e, s);
}

View file

@ -172,7 +172,7 @@ class UrlLauncher {
if (room != null) {
if (room.isSpace) {
// TODO: Implement navigate to space
context.go(['', 'rooms'].join('/'));
context.go('/rooms/${room.id}');
return;
}
@ -185,7 +185,7 @@ class UrlLauncher {
).toString(),
);
} else {
context.go(['', 'rooms', room.id].join('/'));
context.go('/rooms/${room.id}');
}
return;
} else {
@ -226,7 +226,7 @@ class UrlLauncher {
).toString(),
);
} else {
context.go(['', 'rooms', response.result!].join('/'));
context.go('/rooms/${response.result!}');
}
}
}