fix: Regressions because of vrouter
This commit is contained in:
parent
9522077be4
commit
de869d5157
24 changed files with 122 additions and 53 deletions
|
|
@ -23,6 +23,7 @@ class ArchiveController extends State<Archive> {
|
|||
|
||||
void forgetAllAction() async {
|
||||
if (await showOkCancelAlertDialog(
|
||||
useRootNavigator: false,
|
||||
context: context,
|
||||
title: L10n.of(context).areYouSure,
|
||||
okLabel: L10n.of(context).yes,
|
||||
|
|
|
|||
|
|
@ -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<BootstrapDialog> {
|
|||
onPressed: () async {
|
||||
if (OkCancelResult.ok ==
|
||||
await showOkCancelAlertDialog(
|
||||
useRootNavigator: false,
|
||||
context: context,
|
||||
title: L10n.of(context).securityKeyLost,
|
||||
message: L10n.of(context).wipeChatBackup,
|
||||
|
|
|
|||
|
|
@ -233,6 +233,7 @@ class ChatController extends State<Chat> {
|
|||
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<Chat> {
|
|||
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<Chat> {
|
|||
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<Chat> {
|
|||
}
|
||||
final result = await showDialog<String>(
|
||||
context: context,
|
||||
useRootNavigator: false,
|
||||
builder: (c) => RecordingDialog(),
|
||||
);
|
||||
if (result == null) return;
|
||||
|
|
@ -339,6 +343,7 @@ class ChatController extends State<Chat> {
|
|||
]);
|
||||
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<Chat> {
|
|||
|
||||
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<Chat> {
|
|||
void goToNewRoomAction() async {
|
||||
if (OkCancelResult.ok !=
|
||||
await showOkCancelAlertDialog(
|
||||
useRootNavigator: false,
|
||||
context: context,
|
||||
title: L10n.of(context).goToTheNewRoom,
|
||||
message: room
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ class ChatDetailsController extends State<ChatDetails> {
|
|||
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<ChatDetails> {
|
|||
return setAliasAction();
|
||||
}
|
||||
final select = await showConfirmationDialog(
|
||||
useRootNavigator: false,
|
||||
context: context,
|
||||
title: L10n.of(context).editRoomAliases,
|
||||
actions: [
|
||||
|
|
@ -155,6 +157,7 @@ class ChatDetailsController extends State<ChatDetails> {
|
|||
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<ChatDetails> {
|
|||
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,
|
||||
|
|
|
|||
|
|
@ -155,6 +155,7 @@ class ChatListController extends State<ChatList> {
|
|||
|
||||
Future<void> 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<ChatList> {
|
|||
|
||||
void setStatus() async {
|
||||
final input = await showTextInputDialog(
|
||||
useRootNavigator: false,
|
||||
context: context,
|
||||
title: L10n.of(context).setStatus,
|
||||
okLabel: L10n.of(context).ok,
|
||||
|
|
|
|||
|
|
@ -78,6 +78,7 @@ class ChatPermissionsSettingsController extends State<ChatPermissionsSettings> {
|
|||
if (newVersion == null ||
|
||||
OkCancelResult.cancel ==
|
||||
await showOkCancelAlertDialog(
|
||||
useRootNavigator: false,
|
||||
context: context,
|
||||
okLabel: L10n.of(context).yes,
|
||||
cancelLabel: L10n.of(context).cancel,
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ class DevicesSettingsController extends State<DevicesSettings> {
|
|||
|
||||
void removeDevicesAction(List<Device> 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<DevicesSettings> {
|
|||
|
||||
void renameDeviceAction(Device device) async {
|
||||
final displayName = await showTextInputDialog(
|
||||
useRootNavigator: false,
|
||||
context: context,
|
||||
title: L10n.of(context).changeDeviceName,
|
||||
okLabel: L10n.of(context).ok,
|
||||
|
|
|
|||
|
|
@ -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<KeyVerificationDialog> {
|
|||
});
|
||||
if (valid.error != null) {
|
||||
await showOkAlertDialog(
|
||||
useRootNavigator: false,
|
||||
context: context,
|
||||
message: L10n.of(context).incorrectPassphraseOrKey,
|
||||
);
|
||||
|
|
@ -183,6 +186,7 @@ class _KeyVerificationPageState extends State<KeyVerificationDialog> {
|
|||
label: L10n.of(context).verifyManual,
|
||||
onPressed: () async {
|
||||
final result = await showOkCancelAlertDialog(
|
||||
useRootNavigator: false,
|
||||
context: context,
|
||||
title: L10n.of(context).verifyManual,
|
||||
message: key.ed25519Key.beautified,
|
||||
|
|
|
|||
|
|
@ -115,6 +115,7 @@ class LoginController extends State<Login> {
|
|||
|
||||
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<Login> {
|
|||
);
|
||||
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<Login> {
|
|||
);
|
||||
if (ok == null) return;
|
||||
final password = await showTextInputDialog(
|
||||
useRootNavigator: false,
|
||||
context: context,
|
||||
title: L10n.of(context).chooseAStrongPassword,
|
||||
okLabel: L10n.of(context).ok,
|
||||
|
|
|
|||
|
|
@ -14,10 +14,12 @@ class PermissionSliderDialog extends StatefulWidget {
|
|||
? showCupertinoDialog<int>(
|
||||
context: context,
|
||||
builder: (context) => this,
|
||||
useRootNavigator: false,
|
||||
)
|
||||
: showDialog<int>(
|
||||
context: context,
|
||||
builder: (context) => this,
|
||||
useRootNavigator: false,
|
||||
);
|
||||
|
||||
final int initialPermission;
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ class SearchController extends State<Search> {
|
|||
|
||||
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<Search> {
|
|||
|
||||
void setServer() async {
|
||||
final newServer = await showTextInputDialog(
|
||||
useRootNavigator: false,
|
||||
title: L10n.of(context).changeTheHomeserver,
|
||||
context: context,
|
||||
okLabel: L10n.of(context).ok,
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ class SettingsController extends State<Settings> {
|
|||
|
||||
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<Settings> {
|
|||
|
||||
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<Settings> {
|
|||
|
||||
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<Settings> {
|
|||
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<Settings> {
|
|||
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<Settings> {
|
|||
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<Settings> {
|
|||
|
||||
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<Settings> {
|
|||
Future<void> 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<Settings> {
|
|||
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<Settings> {
|
|||
});
|
||||
} 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<Settings> {
|
|||
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<Settings> {
|
|||
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,
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ class Settings3Pid extends StatefulWidget {
|
|||
class Settings3PidController extends State<Settings3Pid> {
|
||||
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<Settings3Pid> {
|
|||
);
|
||||
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<Settings3Pid> {
|
|||
|
||||
void delete3Pid(ThirdPartyIdentifier identifier) async {
|
||||
if (await showOkCancelAlertDialog(
|
||||
useRootNavigator: false,
|
||||
context: context,
|
||||
title: L10n.of(context).areYouSure,
|
||||
okLabel: L10n.of(context).yes,
|
||||
|
|
|
|||
|
|
@ -135,6 +135,7 @@ class EmotesSettingsController extends State<EmotesSettings> {
|
|||
-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<EmotesSettings> {
|
|||
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<EmotesSettings> {
|
|||
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<EmotesSettings> {
|
|||
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<EmotesSettings> {
|
|||
}
|
||||
if (!RegExp(r'^:[-\w]+:$').hasMatch(emoteCode)) {
|
||||
await showOkAlertDialog(
|
||||
useRootNavigator: false,
|
||||
context: context,
|
||||
message: L10n.of(context).emoteInvalid,
|
||||
okLabel: L10n.of(context).ok,
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ class SignUpPasswordController extends State<SignUpPassword> {
|
|||
);
|
||||
if (OkCancelResult.ok !=
|
||||
await showOkCancelAlertDialog(
|
||||
useRootNavigator: false,
|
||||
context: context,
|
||||
message: L10n.of(context).weSentYouAnEmail,
|
||||
okLabel: L10n.of(context).confirm,
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ class UserBottomSheetController extends State<UserBottomSheet> {
|
|||
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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue