appState support modal message

This commit is contained in:
Dan Ballard 2021-12-17 17:13:09 -05:00
parent 0ef219bbb6
commit 6ba447f941
2 changed files with 7 additions and 1 deletions

View File

@ -110,7 +110,7 @@ class FlwtchState extends State<Flwtch> {
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()),
),
);
},

View File

@ -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;