fix: GoException: no routes for location: /login when presetHomeserver

fixes #3603
This commit is contained in:
Christian Kußowski committed 2026-09-12 08:23:46 +02:00
1 parent e13c72b8c5
commit e531baa0f0
2 files changed
+4 -4

No files matched your search

+2 -2
View File
@@ -5,5 +5,5 @@
ignore:
- handy_window
- sqlcipher_flutter_libs
- media_kit_libs_audio
- media_kit_libs_linux
- media_kit_libs_windows_audio
@@ -67,9 +67,9 @@ Future<void> connectToHomeserverFlow(
final pathSegments = List.of(
GoRouter.of(context).routeInformationProvider.value.uri.pathSegments,
);
pathSegments.removeLast();
if (pathSegments.last != 'home') pathSegments.removeLast();
pathSegments.add('login');
context.go('/${pathSegments.join('/')}', extra: client);
context.push('/${pathSegments.join('/')}', extra: client);
setState(AsyncSnapshot.withData(ConnectionState.done, true));
return;
}