mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-19 18:18:38 +00:00
parent
b7bfd334f3
commit
306471be60
@ -618,6 +618,14 @@ Rectangle {
|
|||||||
StatusEmojiSuggestionPopup {
|
StatusEmojiSuggestionPopup {
|
||||||
id: emojiSuggestions
|
id: emojiSuggestions
|
||||||
messageInput: messageInput
|
messageInput: messageInput
|
||||||
|
onClicked: function (index) {
|
||||||
|
if (index === undefined) {
|
||||||
|
index = emojiSuggestions.listView.currentIndex
|
||||||
|
}
|
||||||
|
|
||||||
|
const unicode = emojiSuggestions.modelList[index].unicode_alternates || emojiSuggestions.modelList[index].unicode
|
||||||
|
replaceWithEmoji(extrapolateCursorPosition(), emojiSuggestions.shortname, unicode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SuggestionBoxPanel {
|
SuggestionBoxPanel {
|
||||||
|
@ -8,6 +8,7 @@ import shared 1.0
|
|||||||
|
|
||||||
StatusInputListPopup {
|
StatusInputListPopup {
|
||||||
id: emojiSuggestions
|
id: emojiSuggestions
|
||||||
|
|
||||||
property string shortname
|
property string shortname
|
||||||
property string unicode: {
|
property string unicode: {
|
||||||
if(listView.currentIndex < 0 || listView.currentIndex >= emojiSuggestions.modelList.count)
|
if(listView.currentIndex < 0 || listView.currentIndex >= emojiSuggestions.modelList.count)
|
||||||
@ -26,9 +27,6 @@ StatusInputListPopup {
|
|||||||
getId: function (modelData) {
|
getId: function (modelData) {
|
||||||
return modelData.unicode
|
return modelData.unicode
|
||||||
}
|
}
|
||||||
onClicked: function (index) {
|
|
||||||
emojiSuggestions.addEmoji(index)
|
|
||||||
}
|
|
||||||
|
|
||||||
function openPopup(emojisParam, shortnameParam) {
|
function openPopup(emojisParam, shortnameParam) {
|
||||||
modelList = emojisParam
|
modelList = emojisParam
|
||||||
|
Loading…
x
Reference in New Issue
Block a user