parent
b7bfd334f3
commit
306471be60
|
@ -618,6 +618,14 @@ Rectangle {
|
|||
StatusEmojiSuggestionPopup {
|
||||
id: emojiSuggestions
|
||||
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 {
|
||||
|
|
|
@ -8,6 +8,7 @@ import shared 1.0
|
|||
|
||||
StatusInputListPopup {
|
||||
id: emojiSuggestions
|
||||
|
||||
property string shortname
|
||||
property string unicode: {
|
||||
if(listView.currentIndex < 0 || listView.currentIndex >= emojiSuggestions.modelList.count)
|
||||
|
@ -26,9 +27,6 @@ StatusInputListPopup {
|
|||
getId: function (modelData) {
|
||||
return modelData.unicode
|
||||
}
|
||||
onClicked: function (index) {
|
||||
emojiSuggestions.addEmoji(index)
|
||||
}
|
||||
|
||||
function openPopup(emojisParam, shortnameParam) {
|
||||
modelList = emojisParam
|
||||
|
|
Loading…
Reference in New Issue