mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-07-18 01:14:07 +00:00
fix loader issue
This commit is contained in:
parent
e000b7c41d
commit
6db45a6da8
2 changed files with 7 additions and 16 deletions
|
|
@ -22,10 +22,6 @@ class _BackupSetupPageState extends State<BackupSetupPage> {
|
||||||
final TextEditingController _repeatedPasswordCtrl = TextEditingController();
|
final TextEditingController _repeatedPasswordCtrl = TextEditingController();
|
||||||
|
|
||||||
Future<bool> onPressedEnableTwonlySafe() async {
|
Future<bool> onPressedEnableTwonlySafe() async {
|
||||||
setState(() {
|
|
||||||
_isLoading = true;
|
|
||||||
});
|
|
||||||
|
|
||||||
if (!await isSecurePassword(_passwordCtrl.text)) {
|
if (!await isSecurePassword(_passwordCtrl.text)) {
|
||||||
if (!mounted) return true;
|
if (!mounted) return true;
|
||||||
final ignore = await showAlertDialog(
|
final ignore = await showAlertDialog(
|
||||||
|
|
@ -37,13 +33,14 @@ class _BackupSetupPageState extends State<BackupSetupPage> {
|
||||||
);
|
);
|
||||||
if (!mounted) return true;
|
if (!mounted) return true;
|
||||||
if (ignore) {
|
if (ignore) {
|
||||||
setState(() {
|
|
||||||
_isLoading = false;
|
|
||||||
});
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setState(() {
|
||||||
|
_isLoading = true;
|
||||||
|
});
|
||||||
|
|
||||||
await Future.delayed(const Duration(milliseconds: 100));
|
await Future.delayed(const Duration(milliseconds: 100));
|
||||||
await BackupService.updateBackupPassword(_passwordCtrl.text);
|
await BackupService.updateBackupPassword(_passwordCtrl.text);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,10 +30,6 @@ class _SetupBackupViewState extends State<SetupBackupView> {
|
||||||
final TextEditingController _repeatedController = TextEditingController();
|
final TextEditingController _repeatedController = TextEditingController();
|
||||||
|
|
||||||
Future<void> _updateBackupPassword() async {
|
Future<void> _updateBackupPassword() async {
|
||||||
setState(() {
|
|
||||||
_isLoading = true;
|
|
||||||
});
|
|
||||||
|
|
||||||
if (!await isSecurePassword(_passwordController.text)) {
|
if (!await isSecurePassword(_passwordController.text)) {
|
||||||
if (!mounted) return;
|
if (!mounted) return;
|
||||||
final ignore = await showAlertDialog(
|
final ignore = await showAlertDialog(
|
||||||
|
|
@ -44,14 +40,12 @@ class _SetupBackupViewState extends State<SetupBackupView> {
|
||||||
customOk: context.lang.backupInsecurePasswordCancel,
|
customOk: context.lang.backupInsecurePasswordCancel,
|
||||||
);
|
);
|
||||||
if (ignore) {
|
if (ignore) {
|
||||||
if (mounted) {
|
|
||||||
setState(() {
|
|
||||||
_isLoading = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
setState(() {
|
||||||
|
_isLoading = true;
|
||||||
|
});
|
||||||
|
|
||||||
if (!mounted) return;
|
if (!mounted) return;
|
||||||
final verified = await authenticateUser(
|
final verified = await authenticateUser(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue