From f7a43077fe4e139dd7e3f46f448e0951740ec148 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Wed, 2 Sep 2026 18:26:45 +0800 Subject: fix: qmlfmt IListView: animation --- services/Emoji.qml | 90 +++++++++++++++++++++++++++--------------------------- 1 file changed, 45 insertions(+), 45 deletions(-) (limited to 'services/Emoji.qml') diff --git a/services/Emoji.qml b/services/Emoji.qml index 108fbd9..697840b 100644 --- a/services/Emoji.qml +++ b/services/Emoji.qml @@ -6,49 +6,49 @@ import QtQuick import qs.components Searchable { - id: root - - property var _emojis: [] - property var _emojiFile: FileView { - path: "/usr/share/rofi-emoji/all_emojis.txt" - onTextChanged: _parseEmojis() - } - - list: _emojis - keys: ["name", "keywords", "category", "subcategory", "emoji"] - algorithm: Searchable.SearchAlgorithm.Include - - function transformSearch(search) { - return search.toLowerCase(); - } - - function _parseEmojis() { - const text = _emojiFile.text(); - if (!text) { - console.warn("Emoji service: failed to load", _emojiFile.path); - _emojis = []; - return; - } - - const lines = text.split("\n").filter(l => l.trim()); - const out = []; - for (let i = 0; i < lines.length; ++i) { - const parts = lines[i].split("\t"); - if (parts.length < 5) - continue; - const [emoji, category, subcategory, name, keywords] = parts; - out.push({ - emoji: emoji, - category: category, - subcategory: subcategory, - name: name, - keywords: keywords - }); - } - _emojis = out; - } - - function copy(emoji) { - Clip.copy(emoji); - } + id: root + + property var _emojis: [] + property var _emojiFile: FileView { + path: "/usr/share/rofi-emoji/all_emojis.txt" + onTextChanged: _parseEmojis() + } + + list: _emojis + keys: ["name", "keywords", "category", "subcategory", "emoji"] + algorithm: Searchable.SearchAlgorithm.Include + + function transformSearch(search) { + return search.toLowerCase(); + } + + function _parseEmojis() { + const text = _emojiFile.text(); + if (!text) { + console.warn("Emoji service: failed to load", _emojiFile.path); + _emojis = []; + return; + } + + const lines = text.split("\n").filter(l => l.trim()); + const out = []; + for (let i = 0; i < lines.length; ++i) { + const parts = lines[i].split("\t"); + if (parts.length < 5) + continue; + const [emoji, category, subcategory, name, keywords] = parts; + out.push({ + emoji: emoji, + category: category, + subcategory: subcategory, + name: name, + keywords: keywords + }); + } + _emojis = out; + } + + function copy(emoji) { + Clip.copy(emoji); + } } -- cgit v1.2.3