mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-09 22:06:25 +00:00
19e0be07d8
- upgrade to latest TWEmoji 15.1.0 from https://github.com/jdecked/twemoji (the original twemoji is abandonware now) - create new EmojiJSON metadata from https://github.com/milesj/emojibase - removed unused 26x26 assets - add storybook page for StatusEmojiPopup Fixes #8979
35 lines
888 B
QML
35 lines
888 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_alternates ||
|
|
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()
|
|
}
|
|
}
|