refactor: Switch to loading dialog
This commit is contained in:
parent
9521a93622
commit
75797a62b9
36 changed files with 461 additions and 350 deletions
|
|
@ -8,7 +8,7 @@ import 'package:fluffychat/views/chat_encryption_settings.dart';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
|
||||
import 'dialogs/simple_dialogs.dart';
|
||||
import 'package:future_loading_dialog/future_loading_dialog.dart';
|
||||
import 'matrix.dart';
|
||||
|
||||
class EncryptionButton extends StatefulWidget {
|
||||
|
|
@ -46,8 +46,9 @@ class _EncryptionButtonState extends State<EncryptionButton> {
|
|||
okLabel: L10n.of(context).yes,
|
||||
) ==
|
||||
OkCancelResult.ok) {
|
||||
await SimpleDialogs(context).tryRequestWithLoadingDialog(
|
||||
widget.room.enableEncryption(),
|
||||
await showFutureLoadingDialog(
|
||||
context: context,
|
||||
future: () => widget.room.enableEncryption(),
|
||||
);
|
||||
// we want to enable the lock icon
|
||||
setState(() => null);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue