Merge remote-tracking branch 'origin/main'
Some checks failed
Main Deploy Workflow / deploy_web (push) Has been cancelled
Main Deploy Workflow / deploy_playstore_internal (push) Has been cancelled

This commit is contained in:
Alexey 2026-03-20 14:50:02 +03:00
commit 2c8d415475
34 changed files with 495 additions and 727 deletions

View file

@ -41,11 +41,13 @@ Future<OkCancelResult?> showOkCancelAlertDialog({
),
actions: [
AdaptiveDialogAction(
key: Key('ok_cancel_alert_dialog_cancel_button'),
onPressed: () =>
Navigator.of(context).pop<OkCancelResult>(OkCancelResult.cancel),
child: Text(cancelLabel ?? L10n.of(context).cancel),
),
AdaptiveDialogAction(
key: Key('ok_cancel_alert_dialog_ok_button'),
onPressed: () =>
Navigator.of(context).pop<OkCancelResult>(OkCancelResult.ok),
autofocus: true,

View file

@ -85,7 +85,11 @@ class LoadingDialogState<T> extends State<LoadingDialog> {
void initState() {
super.initState();
widget.future.then(
(result) => Navigator.of(context).pop<Result<T>>(Result.value(result)),
(result) {
if (!mounted) return;
if (!Navigator.of(context).canPop()) return;
Navigator.of(context).pop<Result<T>>(Result.value(result));
},
onError: (e, s) => setState(() {
exception = e;
stackTrace = s;

View file

@ -371,7 +371,6 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
onKeyVerificationRequestSub.values.map((s) => s.cancel());
onLogoutSub.values.map((s) => s.cancel());
onNotification.values.map((s) => s.cancel());
client.httpClient.close();
linuxNotifications?.close();