mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-03-12 09:27:01 +00:00
ensure loadShared is only called once
This commit is contained in:
parent
676b26ce37
commit
ca8f63c07a
1 changed files with 6 additions and 0 deletions
|
@ -227,9 +227,15 @@ class _MaterialAppWithThemeState extends ConsumerState<MaterialAppWithTheme>
|
|||
late final Completer<void> loadingCompleter;
|
||||
|
||||
bool didLoad = false;
|
||||
bool didLoadShared = false;
|
||||
bool _desktopHasPassword = false;
|
||||
|
||||
Future<void> loadShared() async {
|
||||
if (didLoadShared) {
|
||||
return;
|
||||
}
|
||||
didLoadShared = true;
|
||||
|
||||
await DB.instance.init();
|
||||
await ref.read(prefsChangeNotifierProvider).init();
|
||||
|
||||
|
|
Loading…
Reference in a new issue