From 6ba447f9417e23a27f4212cb52b5d25fc18e5e21 Mon Sep 17 00:00:00 2001 From: Dan Ballard Date: Fri, 17 Dec 2021 17:13:09 -0500 Subject: [PATCH] appState support modal message --- lib/main.dart | 2 +- lib/model.dart | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/main.dart b/lib/main.dart index 3c3f27bd..9a8ba5b5 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -110,7 +110,7 @@ class FlwtchState extends State { supportedLocales: AppLocalizations.supportedLocales, title: 'Cwtch', theme: mkThemeData(settings), - home: appState.cwtchInit == true ? ShiftRightFixer(child: ProfileMgrView()) : SplashView(), + home: (!appState.cwtchInit || appState.modalState != ModalState.none) ? SplashView() : ShiftRightFixer(child: ProfileMgrView()), ), ); }, diff --git a/lib/model.dart b/lib/model.dart index 2106895b..e0953b12 100644 --- a/lib/model.dart +++ b/lib/model.dart @@ -26,8 +26,14 @@ class ChatMessage { }; } +enum ModalState { + none, + storageMigration +} + class AppState extends ChangeNotifier { bool cwtchInit = false; + ModalState modalState = ModalState.none; bool cwtchIsClosing = false; String appError = ""; String? _selectedProfile;