refactor: Migrate routes to go router
This commit is contained in:
parent
739edde729
commit
ee957ab1f6
52 changed files with 584 additions and 612 deletions
|
|
@ -120,7 +120,7 @@ class StoryPageController extends State<StoryPage> {
|
|||
void share() async {
|
||||
Matrix.of(context).shareContent = currentEvent?.content;
|
||||
hold();
|
||||
VRouter.of(context).to('share');
|
||||
context.go('share');
|
||||
}
|
||||
|
||||
void displaySeenByUsers() async {
|
||||
|
|
@ -199,7 +199,7 @@ class StoryPageController extends State<StoryPage> {
|
|||
return room.ownPowerLevel >= 100;
|
||||
}
|
||||
|
||||
String get roomId => VRouter.of(context).pathParameters['roomid'] ?? '';
|
||||
String get roomId => GoRouterState.of(context).pathParameters['roomid'] ?? '';
|
||||
|
||||
Future<VideoPlayerController?>? loadVideoControllerFuture;
|
||||
|
||||
|
|
@ -228,9 +228,9 @@ class StoryPageController extends State<StoryPage> {
|
|||
void skip() {
|
||||
if (index + 1 >= max) {
|
||||
if (isOwnStory) {
|
||||
VRouter.of(context).to('/stories/create');
|
||||
context.go('/rooms/stories/create');
|
||||
} else {
|
||||
VRouter.of(context).to('/rooms');
|
||||
context.go('/rooms');
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
@ -497,7 +497,8 @@ class StoryPageController extends State<StoryPage> {
|
|||
currentEvent!.senderFromMemoryOrFallback.startDirectChat(),
|
||||
);
|
||||
if (roomIdResult.error != null) return;
|
||||
VRouter.of(context).toSegments(['rooms', roomIdResult.result!]);
|
||||
context.go(['', 'rooms', roomIdResult.result!].join('/'));
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue