From 55c8475ebaef0131dc19ba0f4b61da79009d9232 Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Tue, 7 Feb 2023 13:52:14 +0100 Subject: [PATCH] chore: Follow up settings page design --- lib/pages/settings/settings_view.dart | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/lib/pages/settings/settings_view.dart b/lib/pages/settings/settings_view.dart index be0326f3..af2903f5 100644 --- a/lib/pages/settings/settings_view.dart +++ b/lib/pages/settings/settings_view.dart @@ -19,6 +19,7 @@ class SettingsView extends StatelessWidget { @override Widget build(BuildContext context) { + final showChatBackupBanner = controller.showChatBackupBanner; return Scaffold( appBar: AppBar( leading: CloseButton( @@ -132,13 +133,20 @@ class SettingsView extends StatelessWidget { ); }), const Divider(thickness: 1), - SwitchListTile.adaptive( - controlAffinity: ListTileControlAffinity.trailing, - value: controller.showChatBackupBanner == false, - secondary: const Icon(Icons.backup_outlined), - title: Text(L10n.of(context)!.chatBackup), - onChanged: controller.firstRunBootstrapAction, - ), + if (showChatBackupBanner == null) + ListTile( + leading: const Icon(Icons.backup_outlined), + title: Text(L10n.of(context)!.chatBackup), + trailing: const CircularProgressIndicator.adaptive(), + ) + else + SwitchListTile.adaptive( + controlAffinity: ListTileControlAffinity.trailing, + value: controller.showChatBackupBanner == false, + secondary: const Icon(Icons.backup_outlined), + title: Text(L10n.of(context)!.chatBackup), + onChanged: controller.firstRunBootstrapAction, + ), const Divider(thickness: 1), ListTile( leading: const Icon(Icons.format_paint_outlined),