summaryrefslogtreecommitdiff
path: root/launcher/components/Spell.qml
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2025-08-18 01:06:16 +0800
committerlittleblack111 <littleblack11111@gmail.com>2025-08-19 20:15:21 +0800
commite4fab905c3657c599574a2cabbf832a73a14e3da (patch)
treef63d839cb3406b21189d17c6a5da5dbf8e87b60f /launcher/components/Spell.qml
parent13f16c4aaa53aae232b61e6ba52e2851f8e685c7 (diff)
perf(launcher:Components): less checks syncSelectionState
Diffstat (limited to 'launcher/components/Spell.qml')
-rw-r--r--launcher/components/Spell.qml7
1 files changed, 1 insertions, 6 deletions
diff --git a/launcher/components/Spell.qml b/launcher/components/Spell.qml
index 52f32b1..d04e0eb 100644
--- a/launcher/components/Spell.qml
+++ b/launcher/components/Spell.qml
@@ -112,12 +112,7 @@ IComponent {
}
syncSelectionState: function () {
- if (!loader.view)
- return;
-
- Qt.callLater(() => {
- state.selected = loader.view.currentItem;
- });
+ Qt.callLater(() => state.selected = loader.view.itemAtIndex(selectedIndex));
}
IInnerComponent {