From d654e200a2edfd7c63a48b119ac332a4944e8278 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Mon, 18 Aug 2025 00:37:01 +0800 Subject: perf(Clip,Emoji): only query when active this also stops additional js functions triggered by bindings --- launcher/components/Clip.qml | 2 +- launcher/components/Emoji.qml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/launcher/components/Clip.qml b/launcher/components/Clip.qml index 66c3ea9..0cde5fa 100644 --- a/launcher/components/Clip.qml +++ b/launcher/components/Clip.qml @@ -10,7 +10,7 @@ import qs.config IComponent { id: root - property var clipHist: Clip.query(inputCleaned) + property var clipHist: active ? Clip.query(inputCleaned) : [] property int selectedIndex: -1 property bool mouseTriggered: false diff --git a/launcher/components/Emoji.qml b/launcher/components/Emoji.qml index 57be01a..bc79e71 100644 --- a/launcher/components/Emoji.qml +++ b/launcher/components/Emoji.qml @@ -10,7 +10,7 @@ import qs.config IComponent { id: root - property var emojis: Emoji.query(input) + property var emojis: active ? Emoji.query(input) : [] property int selectedIndex: -1 property int cols: Math.max(1, Math.floor(innerLoader.width / Math.max(1, Math.round(Launcher.widgetFontSize * 4)))) -- cgit v1.2.3