refactor: Always open Chat Backup as page right after login

This commit is contained in:
Christian Kußowski 2025-11-22 14:58:07 +01:00
commit 31a204f1ea
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652
8 changed files with 95 additions and 69 deletions

View file

@ -7,6 +7,7 @@ import 'package:matrix/matrix.dart';
import 'package:fluffychat/config/themes.dart';
import 'package:fluffychat/pages/archive/archive.dart';
import 'package:fluffychat/pages/bootstrap/bootstrap_dialog.dart';
import 'package:fluffychat/pages/chat/chat.dart';
import 'package:fluffychat/pages/chat_access_settings/chat_access_settings_controller.dart';
import 'package:fluffychat/pages/chat_details/chat_details.dart';
@ -101,6 +102,17 @@ abstract class AppRoutes {
const ConfigViewer(),
),
),
GoRoute(
path: '/backup',
redirect: loggedOutRedirect,
pageBuilder: (context, state) => defaultPageBuilder(
context,
state,
BootstrapDialog(
wipe: state.uri.queryParameters['wipe'] == 'true',
),
),
),
ShellRoute(
// Never use a transition on the shell route. Changing the PageBuilder
// here based on a MediaQuery causes the child to briefly be rendered