@lvce-editor/title-bar-worker 4.25.4 → 4.25.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/titleBarWorkerMain.js +18 -4
- package/package.json +1 -1
|
@@ -5354,19 +5354,33 @@ const selectIndexNone = async (state, item) => {
|
|
|
5354
5354
|
const {
|
|
5355
5355
|
uid
|
|
5356
5356
|
} = state;
|
|
5357
|
-
await executeMenuItemCommand(item);
|
|
5358
5357
|
const storedState = get(uid);
|
|
5359
5358
|
const latestState = storedState?.newState ?? state;
|
|
5360
|
-
const
|
|
5359
|
+
const closedState = {
|
|
5361
5360
|
...latestState,
|
|
5362
5361
|
focusedIndex: -1,
|
|
5363
5362
|
isMenuOpen: false,
|
|
5364
5363
|
menus: []
|
|
5365
5364
|
};
|
|
5366
5365
|
if (storedState) {
|
|
5367
|
-
set$1(uid, storedState.oldState,
|
|
5366
|
+
set$1(uid, storedState.oldState, closedState, closedState);
|
|
5367
|
+
if (latestState.menus.length > 0) {
|
|
5368
|
+
const [command, ...args] = renderMenus(latestState, closedState);
|
|
5369
|
+
await invoke$2(command, ...args);
|
|
5370
|
+
}
|
|
5368
5371
|
}
|
|
5369
|
-
|
|
5372
|
+
await executeMenuItemCommand(item);
|
|
5373
|
+
const latestCommandState = get(uid)?.newState ?? closedState;
|
|
5374
|
+
const finalState = {
|
|
5375
|
+
...latestCommandState,
|
|
5376
|
+
focusedIndex: -1,
|
|
5377
|
+
isMenuOpen: false,
|
|
5378
|
+
menus: []
|
|
5379
|
+
};
|
|
5380
|
+
if (storedState) {
|
|
5381
|
+
set$1(uid, finalState, finalState, finalState);
|
|
5382
|
+
}
|
|
5383
|
+
return finalState;
|
|
5370
5384
|
};
|
|
5371
5385
|
|
|
5372
5386
|
const selectIndexRestoreEditorFocus = async (state, item) => {
|