mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-09 13:56:10 +00:00
9d9fb69e3b
- the new C++ EmojiModel provides a simple wrapper around the existing JSON to facilitate a faster access and to be able to search/filter in QML using SFPM - no more nested GridViews inside Repeaters - get rid of emoji manipulation and search/filter using JavaScript - included the C++ script to generate the emojiList.js
34 lines
800 B
QML
34 lines
800 B
QML
import QtQuick 2.15
|
|
|
|
import shared.status 1.0
|
|
|
|
import StatusQ.Core.Utils 0.1
|
|
|
|
StatusInputListPopup {
|
|
id: emojiSuggestions
|
|
|
|
property string shortname
|
|
property string unicode: {
|
|
if(listView.currentIndex < 0 || listView.currentIndex >= emojiSuggestions.modelList.count)
|
|
return ""
|
|
|
|
return emojiSuggestions.modelList[listView.currentIndex].unicode
|
|
}
|
|
|
|
getImageSource: function (modelData) {
|
|
return Emoji.svgImage(modelData.unicode)
|
|
}
|
|
getText: function (modelData) {
|
|
return modelData.shortname
|
|
}
|
|
getId: function (modelData) {
|
|
return modelData.unicode
|
|
}
|
|
|
|
function openPopup(emojisParam, shortnameParam) {
|
|
modelList = emojisParam
|
|
shortname = shortnameParam
|
|
emojiSuggestions.open()
|
|
}
|
|
}
|