mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 05:25:40 +09:00
perf(app): load the keyboard mode intro modal only when it is shown (#1880)
This commit is contained in:
1 parent
5821a68816
commit
9b3dc19037
2 files changed
+7
-5
No files matched your search
@@ -1,6 +1,5 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
import {KeyboardModeIntroModal} from '@app/features/input/components/modals/KeyboardModeIntroModal';
|
||||
import {Logger} from '@app/features/platform/utils/AppLogger';
|
||||
import {registerKeyboardModeRestoreCallback, registerKeyboardModeStateResolver} from '@app/features/ui/state/Modal';
|
||||
import {makeSyncedField} from '@app/features/user/state/SyncedField';
|
||||
@@ -35,7 +34,10 @@ class KeyboardMode {
|
||||
});
|
||||
if (showIntro && !this.introSeen) {
|
||||
this.introSeen = true;
|
||||
void import('@app/features/ui/commands/ModalCommands').then(({modal, push}) => {
|
||||
void Promise.all([
|
||||
import('@app/features/ui/commands/ModalCommands'),
|
||||
import('@app/features/input/components/modals/KeyboardModeIntroModal'),
|
||||
]).then(([{modal, push}, {KeyboardModeIntroModal}]) => {
|
||||
push(modal(() => <KeyboardModeIntroModal data-flx="ui.keyboard-mode.keyboard-mode-intro-modal" />));
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user