diff --git a/lib/pages/homeserver_picker.dart b/lib/pages/homeserver_picker.dart index 5ed7ec70..efbabeb5 100644 --- a/lib/pages/homeserver_picker.dart +++ b/lib/pages/homeserver_picker.dart @@ -198,7 +198,7 @@ class HomeserverPickerController extends State { ssoHomeserverKey, Matrix.of(context).client.homeserver.toString()); } final redirectUrl = kIsWeb - ? AppConfig.webBaseUrl + ? AppConfig.webBaseUrl + '/#/' : AppConfig.appOpenUrlScheme.toLowerCase() + '://login'; launch( '${Matrix.of(context).client.homeserver?.toString()}/_matrix/client/r0/login/sso/redirect/${Uri.encodeComponent(id)}?redirectUrl=${Uri.encodeQueryComponent(redirectUrl)}', diff --git a/lib/widgets/layouts/loading_view.dart b/lib/widgets/layouts/loading_view.dart index 3c22deb4..de3ca8cb 100644 --- a/lib/widgets/layouts/loading_view.dart +++ b/lib/widgets/layouts/loading_view.dart @@ -7,10 +7,14 @@ class LoadingView extends StatelessWidget { @override Widget build(BuildContext context) { if (Matrix.of(context).loginState != null) { - WidgetsBinding.instance.addPostFrameCallback((_) => context.vRouter.push( + WidgetsBinding.instance.addPostFrameCallback( + (_) => context.vRouter.push( Matrix.of(context).loginState == LoginState.logged ? '/rooms' - : '/home')); + : '/home', + queryParameters: VRouter.of(context).queryParameters, + ), + ); } return Scaffold(body: Center(child: CircularProgressIndicator())); } diff --git a/lib/widgets/matrix.dart b/lib/widgets/matrix.dart index d9f6de85..802083a7 100644 --- a/lib/widgets/matrix.dart +++ b/lib/widgets/matrix.dart @@ -330,8 +330,10 @@ class MatrixState extends State with WidgetsBindingObserver { .contains(widget.router.currentState.url); if (widget.router.currentState.url == '/' || (state == LoginState.logged) == isInLoginRoutes) { - widget.router.currentState - .push(loginState == LoginState.logged ? '/rooms' : '/home'); + widget.router.currentState.push( + loginState == LoginState.logged ? '/rooms' : '/home', + queryParameters: widget.router.currentState.queryParameters, + ); } } });