diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-08-15 17:39:38 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-08-15 17:39:38 +0800 |
| commit | 4dec9b755e3ae4528d50cc9902f658f4ef011f4d (patch) | |
| tree | 091901536e5810a752d4cbae7f573259ada9f3b0 /launcher | |
| parent | 73b2e1d104137bb651cf659e8976b45194b0862f (diff) | |
perf(App): stop inf recursion when listView.count > 0
this happens when nothing is in listView because if(item) crit is not
met(invalid due to selectedIndex not existing in listView as nothing is
in listView)
Diffstat (limited to 'launcher')
| -rw-r--r-- | launcher/components/App.qml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/launcher/components/App.qml b/launcher/components/App.qml index 4bea8a0..5061070 100644 --- a/launcher/components/App.qml +++ b/launcher/components/App.qml @@ -107,7 +107,7 @@ IComponent { const item = listView.itemAtIndex(selectedIndex); if (item) state.selected = item; - else { + else if (listView.count > 0) { // wait until it's created listView.forceLayout(); // forces creation if in view Qt.callLater(syncSelectionState); |
