From 8ee4e3c15594a6ca69cc2f2006ee97ff99931d17 Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Sun, 23 May 2021 15:02:36 +0200 Subject: [PATCH] fix: Regressions because of vrouter --- lib/config/routes.dart | 110 +++++++++++---------- lib/pages/archive.dart | 1 + lib/pages/bootstrap_dialog.dart | 3 + lib/pages/chat.dart | 7 ++ lib/pages/chat_details.dart | 4 + lib/pages/chat_list.dart | 2 + lib/pages/chat_permissions_settings.dart | 1 + lib/pages/device_settings.dart | 2 + lib/pages/key_verification_dialog.dart | 4 + lib/pages/login.dart | 3 + lib/pages/permission_slider_dialog.dart | 2 + lib/pages/search.dart | 2 + lib/pages/settings.dart | 12 +++ lib/pages/settings_3pid.dart | 3 + lib/pages/settings_emotes.dart | 5 + lib/pages/sign_up_password.dart | 1 + lib/pages/user_bottom_sheet.dart | 1 + lib/pages/views/settings_view.dart | 1 + lib/utils/platform_infos.dart | 1 + lib/utils/url_launcher.dart | 2 + lib/widgets/chat_settings_popup_menu.dart | 1 + lib/widgets/encryption_button.dart | 2 + lib/widgets/list_items/chat_list_item.dart | 2 + lib/widgets/matrix.dart | 3 + 24 files changed, 122 insertions(+), 53 deletions(-) diff --git a/lib/config/routes.dart b/lib/config/routes.dart index bbcf7d0a..0cd9a0f2 100644 --- a/lib/config/routes.dart +++ b/lib/config/routes.dart @@ -145,7 +145,22 @@ class AppRoutes { ), buildTransition: _fadeTransition, stackedRoutes: [ - _settingsRoute, + VNester( + path: '/settings', + widgetBuilder: (child) => TwoColumnLayout( + mainView: Settings(), + sideView: child, + ), + buildTransition: _dynamicTransition, + nestedRoutes: [ + VWidget( + path: '', + widget: EmptyPage(), + buildTransition: _dynamicTransition, + stackedRoutes: _settingsRoutes, + ), + ], + ), VWidget( path: '/search', widget: TwoColumnLayout( @@ -185,7 +200,11 @@ class AppRoutes { stackedRoutes: _chatDetailsRoutes, ), ]), - _settingsRoute, + VWidget( + path: '/settings', + widget: Settings(), + stackedRoutes: _settingsRoutes, + ), VWidget( path: '/search', widget: Search(), @@ -224,58 +243,43 @@ class AppRoutes { ), ]; - VNester get _settingsRoute => VNester( - path: '/settings', - widgetBuilder: (child) => TwoColumnLayout( - mainView: Settings(), - sideView: child, + List get _settingsRoutes => [ + VWidget( + path: 'emotes', + widget: EmotesSettings(), + buildTransition: _dynamicTransition, ), - buildTransition: _dynamicTransition, - nestedRoutes: [ - VWidget( - path: '', - widget: EmptyPage(), - buildTransition: _dynamicTransition, - stackedRoutes: [ - VWidget( - path: 'emotes', - widget: EmotesSettings(), - buildTransition: _dynamicTransition, - ), - VWidget( - path: 'notifications', - widget: SettingsNotifications(), - buildTransition: _dynamicTransition, - ), - VWidget( - path: 'ignorelist', - widget: SettingsIgnoreList(), - buildTransition: _dynamicTransition, - ), - VWidget( - path: 'style', - widget: SettingsStyle(), - buildTransition: _dynamicTransition, - ), - VWidget( - path: 'devices', - widget: DevicesSettings(), - buildTransition: _dynamicTransition, - ), - VWidget( - path: '/logs', - widget: LogViewer(), - buildTransition: _dynamicTransition, - ), - VWidget( - path: '3pid', - widget: Settings3Pid(), - buildTransition: _dynamicTransition, - ), - ], - ), - ], - ); + VWidget( + path: 'notifications', + widget: SettingsNotifications(), + buildTransition: _dynamicTransition, + ), + VWidget( + path: 'ignorelist', + widget: SettingsIgnoreList(), + buildTransition: _dynamicTransition, + ), + VWidget( + path: 'style', + widget: SettingsStyle(), + buildTransition: _dynamicTransition, + ), + VWidget( + path: 'devices', + widget: DevicesSettings(), + buildTransition: _dynamicTransition, + ), + VWidget( + path: '/logs', + widget: LogViewer(), + buildTransition: _dynamicTransition, + ), + VWidget( + path: '3pid', + widget: Settings3Pid(), + buildTransition: _dynamicTransition, + ), + ]; final _fadeTransition = (animation1, _, child) => FadeTransition(opacity: animation1, child: child); diff --git a/lib/pages/archive.dart b/lib/pages/archive.dart index 077b1c17..c0a35db3 100644 --- a/lib/pages/archive.dart +++ b/lib/pages/archive.dart @@ -23,6 +23,7 @@ class ArchiveController extends State { void forgetAllAction() async { if (await showOkCancelAlertDialog( + useRootNavigator: false, context: context, title: L10n.of(context).areYouSure, okLabel: L10n.of(context).yes, diff --git a/lib/pages/bootstrap_dialog.dart b/lib/pages/bootstrap_dialog.dart index bd876b9b..794cec92 100644 --- a/lib/pages/bootstrap_dialog.dart +++ b/lib/pages/bootstrap_dialog.dart @@ -26,11 +26,13 @@ class BootstrapDialog extends StatefulWidget { context: context, builder: (context) => this, barrierDismissible: true, + useRootNavigator: false, ) : showDialog( context: context, builder: (context) => this, barrierDismissible: true, + useRootNavigator: false, ); @override @@ -193,6 +195,7 @@ class _BootstrapDialogState extends State { onPressed: () async { if (OkCancelResult.ok == await showOkCancelAlertDialog( + useRootNavigator: false, context: context, title: L10n.of(context).securityKeyLost, message: L10n.of(context).wipeChatBackup, diff --git a/lib/pages/chat.dart b/lib/pages/chat.dart index 23d48f92..e6e287d6 100644 --- a/lib/pages/chat.dart +++ b/lib/pages/chat.dart @@ -233,6 +233,7 @@ class ChatController extends State { if (result == null) return; await showDialog( context: context, + useRootNavigator: false, builder: (c) => SendFileDialog( file: MatrixFile( bytes: result.toUint8List(), @@ -249,6 +250,7 @@ class ChatController extends State { if (result == null) return; await showDialog( context: context, + useRootNavigator: false, builder: (c) => SendFileDialog( file: MatrixImageFile( bytes: result.toUint8List(), @@ -265,6 +267,7 @@ class ChatController extends State { final bytes = await file.readAsBytes(); await showDialog( context: context, + useRootNavigator: false, builder: (c) => SendFileDialog( file: MatrixImageFile( bytes: bytes, @@ -282,6 +285,7 @@ class ChatController extends State { } final result = await showDialog( context: context, + useRootNavigator: false, builder: (c) => RecordingDialog(), ); if (result == null) return; @@ -339,6 +343,7 @@ class ChatController extends State { ]); if (score == null) return; final reason = await showTextInputDialog( + useRootNavigator: false, context: context, title: L10n.of(context).whyDoYouWantToReportThis, okLabel: L10n.of(context).ok, @@ -362,6 +367,7 @@ class ChatController extends State { void redactEventsAction() async { final confirmed = await showOkCancelAlertDialog( + useRootNavigator: false, context: context, title: L10n.of(context).messageWillBeRemovedWarning, okLabel: L10n.of(context).remove, @@ -538,6 +544,7 @@ class ChatController extends State { void goToNewRoomAction() async { if (OkCancelResult.ok != await showOkCancelAlertDialog( + useRootNavigator: false, context: context, title: L10n.of(context).goToTheNewRoom, message: room diff --git a/lib/pages/chat_details.dart b/lib/pages/chat_details.dart index cbff8e28..0adda97c 100644 --- a/lib/pages/chat_details.dart +++ b/lib/pages/chat_details.dart @@ -31,6 +31,7 @@ class ChatDetailsController extends State { void setDisplaynameAction() async { final room = Matrix.of(context).client.getRoomById(roomId); final input = await showTextInputDialog( + useRootNavigator: false, context: context, title: L10n.of(context).changeTheNameOfTheGroup, okLabel: L10n.of(context).ok, @@ -88,6 +89,7 @@ class ChatDetailsController extends State { return setAliasAction(); } final select = await showConfirmationDialog( + useRootNavigator: false, context: context, title: L10n.of(context).editRoomAliases, actions: [ @@ -155,6 +157,7 @@ class ChatDetailsController extends State { final domain = room.client.userID.domain; final input = await showTextInputDialog( + useRootNavigator: false, context: context, title: L10n.of(context).setInvitationLink, okLabel: L10n.of(context).ok, @@ -179,6 +182,7 @@ class ChatDetailsController extends State { void setTopicAction() async { final room = Matrix.of(context).client.getRoomById(roomId); final input = await showTextInputDialog( + useRootNavigator: false, context: context, title: L10n.of(context).setGroupDescription, okLabel: L10n.of(context).ok, diff --git a/lib/pages/chat_list.dart b/lib/pages/chat_list.dart index 628b55c3..ed56564d 100644 --- a/lib/pages/chat_list.dart +++ b/lib/pages/chat_list.dart @@ -155,6 +155,7 @@ class ChatListController extends State { Future archiveAction() async { final confirmed = await showOkCancelAlertDialog( + useRootNavigator: false, context: context, title: L10n.of(context).areYouSure, okLabel: L10n.of(context).yes, @@ -171,6 +172,7 @@ class ChatListController extends State { void setStatus() async { final input = await showTextInputDialog( + useRootNavigator: false, context: context, title: L10n.of(context).setStatus, okLabel: L10n.of(context).ok, diff --git a/lib/pages/chat_permissions_settings.dart b/lib/pages/chat_permissions_settings.dart index 5b297794..019e475d 100644 --- a/lib/pages/chat_permissions_settings.dart +++ b/lib/pages/chat_permissions_settings.dart @@ -78,6 +78,7 @@ class ChatPermissionsSettingsController extends State { if (newVersion == null || OkCancelResult.cancel == await showOkCancelAlertDialog( + useRootNavigator: false, context: context, okLabel: L10n.of(context).yes, cancelLabel: L10n.of(context).cancel, diff --git a/lib/pages/device_settings.dart b/lib/pages/device_settings.dart index bb19320a..2c0f7702 100644 --- a/lib/pages/device_settings.dart +++ b/lib/pages/device_settings.dart @@ -29,6 +29,7 @@ class DevicesSettingsController extends State { void removeDevicesAction(List devices) async { if (await showOkCancelAlertDialog( + useRootNavigator: false, context: context, title: L10n.of(context).areYouSure, okLabel: L10n.of(context).yes, @@ -63,6 +64,7 @@ class DevicesSettingsController extends State { void renameDeviceAction(Device device) async { final displayName = await showTextInputDialog( + useRootNavigator: false, context: context, title: L10n.of(context).changeDeviceName, okLabel: L10n.of(context).ok, diff --git a/lib/pages/key_verification_dialog.dart b/lib/pages/key_verification_dialog.dart index c8bde86b..f81ee502 100644 --- a/lib/pages/key_verification_dialog.dart +++ b/lib/pages/key_verification_dialog.dart @@ -16,11 +16,13 @@ class KeyVerificationDialog extends StatefulWidget { context: context, barrierDismissible: true, builder: (context) => this, + useRootNavigator: false, ) : showDialog( context: context, barrierDismissible: true, builder: (context) => this, + useRootNavigator: false, ); final KeyVerification request; @@ -96,6 +98,7 @@ class _KeyVerificationPageState extends State { }); if (valid.error != null) { await showOkAlertDialog( + useRootNavigator: false, context: context, message: L10n.of(context).incorrectPassphraseOrKey, ); @@ -183,6 +186,7 @@ class _KeyVerificationPageState extends State { label: L10n.of(context).verifyManual, onPressed: () async { final result = await showOkCancelAlertDialog( + useRootNavigator: false, context: context, title: L10n.of(context).verifyManual, message: key.ed25519Key.beautified, diff --git a/lib/pages/login.dart b/lib/pages/login.dart index 1da03125..067b50a4 100644 --- a/lib/pages/login.dart +++ b/lib/pages/login.dart @@ -115,6 +115,7 @@ class LoginController extends State { void passwordForgotten() async { final input = await showTextInputDialog( + useRootNavigator: false, context: context, title: L10n.of(context).enterAnEmailAddress, okLabel: L10n.of(context).ok, @@ -138,6 +139,7 @@ class LoginController extends State { ); if (response.error != null) return; final ok = await showOkAlertDialog( + useRootNavigator: false, context: context, title: L10n.of(context).weSentYouAnEmail, message: L10n.of(context).pleaseClickOnLink, @@ -145,6 +147,7 @@ class LoginController extends State { ); if (ok == null) return; final password = await showTextInputDialog( + useRootNavigator: false, context: context, title: L10n.of(context).chooseAStrongPassword, okLabel: L10n.of(context).ok, diff --git a/lib/pages/permission_slider_dialog.dart b/lib/pages/permission_slider_dialog.dart index c1016e19..fe1fac59 100644 --- a/lib/pages/permission_slider_dialog.dart +++ b/lib/pages/permission_slider_dialog.dart @@ -14,10 +14,12 @@ class PermissionSliderDialog extends StatefulWidget { ? showCupertinoDialog( context: context, builder: (context) => this, + useRootNavigator: false, ) : showDialog( context: context, builder: (context) => this, + useRootNavigator: false, ); final int initialPermission; diff --git a/lib/pages/search.dart b/lib/pages/search.dart index c9d60ae0..8c8c0a49 100644 --- a/lib/pages/search.dart +++ b/lib/pages/search.dart @@ -59,6 +59,7 @@ class SearchController extends State { void joinGroupAction(PublicRoom room) async { if (await showOkCancelAlertDialog( + useRootNavigator: false, context: context, okLabel: L10n.of(context).joinRoom, title: '${room.name} (${room.numJoinedMembers ?? 0})', @@ -85,6 +86,7 @@ class SearchController extends State { void setServer() async { final newServer = await showTextInputDialog( + useRootNavigator: false, title: L10n.of(context).changeTheHomeserver, context: context, okLabel: L10n.of(context).ok, diff --git a/lib/pages/settings.dart b/lib/pages/settings.dart index 3b64f529..1e320da3 100644 --- a/lib/pages/settings.dart +++ b/lib/pages/settings.dart @@ -37,6 +37,7 @@ class SettingsController extends State { void logoutAction() async { if (await showOkCancelAlertDialog( + useRootNavigator: false, context: context, title: L10n.of(context).areYouSureYouWantToLogout, okLabel: L10n.of(context).yes, @@ -54,6 +55,7 @@ class SettingsController extends State { void changePasswordAccountAction() async { final input = await showTextInputDialog( + useRootNavigator: false, context: context, title: L10n.of(context).changePassword, okLabel: L10n.of(context).ok, @@ -88,6 +90,7 @@ class SettingsController extends State { void deleteAccountAction() async { if (await showOkCancelAlertDialog( + useRootNavigator: false, context: context, title: L10n.of(context).warning, message: L10n.of(context).deactivateAccountWarning, @@ -98,6 +101,7 @@ class SettingsController extends State { return; } if (await showOkCancelAlertDialog( + useRootNavigator: false, context: context, title: L10n.of(context).areYouSure, okLabel: L10n.of(context).yes, @@ -107,6 +111,7 @@ class SettingsController extends State { return; } final input = await showTextInputDialog( + useRootNavigator: false, context: context, title: L10n.of(context).pleaseEnterYourPassword, okLabel: L10n.of(context).ok, @@ -137,6 +142,7 @@ class SettingsController extends State { void setJitsiInstanceAction() async { const prefix = 'https://'; final input = await showTextInputDialog( + useRootNavigator: false, context: context, title: L10n.of(context).editJitsiInstance, okLabel: L10n.of(context).ok, @@ -160,6 +166,7 @@ class SettingsController extends State { void setDisplaynameAction() async { final input = await showTextInputDialog( + useRootNavigator: false, context: context, title: L10n.of(context).editDisplayname, okLabel: L10n.of(context).ok, @@ -224,6 +231,7 @@ class SettingsController extends State { Future requestSSSSCache() async { final handle = Matrix.of(context).client.encryption.ssss.open(); final input = await showTextInputDialog( + useRootNavigator: false, context: context, title: L10n.of(context).askSSSSCache, okLabel: L10n.of(context).ok, @@ -256,6 +264,7 @@ class SettingsController extends State { if (valid.result == true) { await handle.maybeCacheAll(); await showOkAlertDialog( + useRootNavigator: false, context: context, message: L10n.of(context).cachedKeys, okLabel: L10n.of(context).ok, @@ -268,6 +277,7 @@ class SettingsController extends State { }); } else { await showOkAlertDialog( + useRootNavigator: false, context: context, message: L10n.of(context).incorrectPassphraseOrKey, okLabel: L10n.of(context).ok, @@ -283,6 +293,7 @@ class SettingsController extends State { await AppLock.of(context).showLockScreen(); } final newLock = await showTextInputDialog( + useRootNavigator: false, context: context, title: L10n.of(context).pleaseChooseAPasscode, message: L10n.of(context).pleaseEnter4Digits, @@ -317,6 +328,7 @@ class SettingsController extends State { if (await Matrix.of(context).client.encryption.keyManager.isCached()) { if (OkCancelResult.ok == await showOkCancelAlertDialog( + useRootNavigator: false, context: context, title: L10n.of(context).keysCached, message: L10n.of(context).wipeChatBackup, diff --git a/lib/pages/settings_3pid.dart b/lib/pages/settings_3pid.dart index 200dd77f..214227b6 100644 --- a/lib/pages/settings_3pid.dart +++ b/lib/pages/settings_3pid.dart @@ -17,6 +17,7 @@ class Settings3Pid extends StatefulWidget { class Settings3PidController extends State { void add3PidAction() async { final input = await showTextInputDialog( + useRootNavigator: false, context: context, title: L10n.of(context).enterAnEmailAddress, okLabel: L10n.of(context).ok, @@ -40,6 +41,7 @@ class Settings3PidController extends State { ); if (response.error != null) return; final ok = await showOkAlertDialog( + useRootNavigator: false, context: context, title: L10n.of(context).weSentYouAnEmail, message: L10n.of(context).pleaseClickOnLink, @@ -64,6 +66,7 @@ class Settings3PidController extends State { void delete3Pid(ThirdPartyIdentifier identifier) async { if (await showOkCancelAlertDialog( + useRootNavigator: false, context: context, title: L10n.of(context).areYouSure, okLabel: L10n.of(context).yes, diff --git a/lib/pages/settings_emotes.dart b/lib/pages/settings_emotes.dart index 89d33b4f..0f8c568c 100644 --- a/lib/pages/settings_emotes.dart +++ b/lib/pages/settings_emotes.dart @@ -135,6 +135,7 @@ class EmotesSettingsController extends State { -1) { controller.text = emote.emoteClean; showOkAlertDialog( + useRootNavigator: false, context: context, message: L10n.of(context).emoteExists, okLabel: L10n.of(context).ok, @@ -144,6 +145,7 @@ class EmotesSettingsController extends State { if (!RegExp(r'^:[-\w]+:$').hasMatch(emoteCode)) { controller.text = emote.emoteClean; showOkAlertDialog( + useRootNavigator: false, context: context, message: L10n.of(context).emoteInvalid, okLabel: L10n.of(context).ok, @@ -182,6 +184,7 @@ class EmotesSettingsController extends State { newMxcController.text == null || newMxcController.text.isEmpty) { await showOkAlertDialog( + useRootNavigator: false, context: context, message: L10n.of(context).emoteWarnNeedToPick, okLabel: L10n.of(context).ok, @@ -192,6 +195,7 @@ class EmotesSettingsController extends State { final mxc = newMxcController.text; if (emotes.indexWhere((e) => e.emote == emoteCode && e.mxc != mxc) != -1) { await showOkAlertDialog( + useRootNavigator: false, context: context, message: L10n.of(context).emoteExists, okLabel: L10n.of(context).ok, @@ -200,6 +204,7 @@ class EmotesSettingsController extends State { } if (!RegExp(r'^:[-\w]+:$').hasMatch(emoteCode)) { await showOkAlertDialog( + useRootNavigator: false, context: context, message: L10n.of(context).emoteInvalid, okLabel: L10n.of(context).ok, diff --git a/lib/pages/sign_up_password.dart b/lib/pages/sign_up_password.dart index 37f780ea..cce598bd 100644 --- a/lib/pages/sign_up_password.dart +++ b/lib/pages/sign_up_password.dart @@ -58,6 +58,7 @@ class SignUpPasswordController extends State { ); if (OkCancelResult.ok != await showOkCancelAlertDialog( + useRootNavigator: false, context: context, message: L10n.of(context).weSentYouAnEmail, okLabel: L10n.of(context).confirm, diff --git a/lib/pages/user_bottom_sheet.dart b/lib/pages/user_bottom_sheet.dart index 0e7c2203..41b93417 100644 --- a/lib/pages/user_bottom_sheet.dart +++ b/lib/pages/user_bottom_sheet.dart @@ -30,6 +30,7 @@ class UserBottomSheetController extends State { void participantAction(String action) async { final Function _askConfirmation = () async => (await showOkCancelAlertDialog( + useRootNavigator: false, context: context, title: L10n.of(context).areYouSure, okLabel: L10n.of(context).yes, diff --git a/lib/pages/views/settings_view.dart b/lib/pages/views/settings_view.dart index 16479487..da97affa 100644 --- a/lib/pages/views/settings_view.dart +++ b/lib/pages/views/settings_view.dart @@ -202,6 +202,7 @@ class SettingsView extends StatelessWidget { ListTile( title: Text(L10n.of(context).yourPublicKey), onTap: () => showOkAlertDialog( + useRootNavigator: false, context: context, title: L10n.of(context).yourPublicKey, message: client.fingerprintKey.beautified, diff --git a/lib/utils/platform_infos.dart b/lib/utils/platform_infos.dart index b818a02d..98874757 100644 --- a/lib/utils/platform_infos.dart +++ b/lib/utils/platform_infos.dart @@ -43,6 +43,7 @@ abstract class PlatformInfos { final version = await PlatformInfos.getVersion(); showAboutDialog( context: context, + useRootNavigator: false, children: [ Text('Version: $version'), OutlinedButton( diff --git a/lib/utils/url_launcher.dart b/lib/utils/url_launcher.dart index 733262ee..423b2425 100644 --- a/lib/utils/url_launcher.dart +++ b/lib/utils/url_launcher.dart @@ -70,6 +70,7 @@ class UrlLauncher { } if (roomIdOrAlias.sigil == '!') { if (await showOkCancelAlertDialog( + useRootNavigator: false, context: context, title: 'Join room $roomIdOrAlias', ) == @@ -111,6 +112,7 @@ class UrlLauncher { } if (await showOkCancelAlertDialog( + useRootNavigator: false, context: context, title: 'Message user ${user.id}', ) == diff --git a/lib/widgets/chat_settings_popup_menu.dart b/lib/widgets/chat_settings_popup_menu.dart index 38dfe66a..12bf3615 100644 --- a/lib/widgets/chat_settings_popup_menu.dart +++ b/lib/widgets/chat_settings_popup_menu.dart @@ -68,6 +68,7 @@ class _ChatSettingsPopupMenuState extends State { switch (choice) { case 'leave': final confirmed = await showOkCancelAlertDialog( + useRootNavigator: false, context: context, title: L10n.of(context).areYouSure, okLabel: L10n.of(context).ok, diff --git a/lib/widgets/encryption_button.dart b/lib/widgets/encryption_button.dart index f318cb2f..2c32104b 100644 --- a/lib/widgets/encryption_button.dart +++ b/lib/widgets/encryption_button.dart @@ -26,6 +26,7 @@ class _EncryptionButtonState extends State { } if (widget.room.joinRules == JoinRules.public) { await showOkAlertDialog( + useRootNavigator: false, context: context, okLabel: L10n.of(context).ok, message: L10n.of(context).noEncryptionForPublicRooms, @@ -33,6 +34,7 @@ class _EncryptionButtonState extends State { return; } if (await showOkCancelAlertDialog( + useRootNavigator: false, context: context, title: L10n.of(context).enableEncryption, message: widget.room.client.encryptionEnabled diff --git a/lib/widgets/list_items/chat_list_item.dart b/lib/widgets/list_items/chat_list_item.dart index ccbf4622..ae2065e2 100644 --- a/lib/widgets/list_items/chat_list_item.dart +++ b/lib/widgets/list_items/chat_list_item.dart @@ -93,6 +93,7 @@ class ChatListItem extends StatelessWidget { 'chat.fluffy.shared_file') { await showDialog( context: context, + useRootNavigator: false, builder: (c) => SendFileDialog( file: Matrix.of(context).shareContent['file'], room: room, @@ -121,6 +122,7 @@ class ChatListItem extends StatelessWidget { return success; } final confirmed = await showOkCancelAlertDialog( + useRootNavigator: false, context: context, title: L10n.of(context).areYouSure, okLabel: L10n.of(context).yes, diff --git a/lib/widgets/matrix.dart b/lib/widgets/matrix.dart index 1567ac84..5d3f9bac 100644 --- a/lib/widgets/matrix.dart +++ b/lib/widgets/matrix.dart @@ -128,6 +128,7 @@ class MatrixState extends State with WidgetsBindingObserver { case AuthenticationTypes.password: final input = cachedPassword ?? (await showTextInputDialog( + useRootNavigator: false, context: navigatorContext, title: L10n.of(widget.context).pleaseEnterYourPassword, okLabel: L10n.of(widget.context).ok, @@ -182,6 +183,7 @@ class MatrixState extends State with WidgetsBindingObserver { ); if (OkCancelResult.ok == await showOkCancelAlertDialog( + useRootNavigator: false, message: L10n.of(widget.context).pleaseFollowInstructionsOnWeb, context: navigatorContext, okLabel: L10n.of(widget.context).next, @@ -293,6 +295,7 @@ class MatrixState extends State with WidgetsBindingObserver { hidPopup = true; }; if (await showOkCancelAlertDialog( + useRootNavigator: false, context: navigatorContext, title: L10n.of(widget.context).newVerificationRequest, message: