Fixed bug with emote indicator icon not restoring

This commit is contained in:
RebeccaStankus 2019-08-16 09:46:46 -07:00
parent c64da85344
commit 73941f1ece
2 changed files with 13 additions and 15 deletions
scripts/simplifiedUI/simplifiedEmote

View file

@ -150,16 +150,15 @@ Rectangle {
GridView {
id: grid
anchors.fill: parent
anchors.leftMargin: 14
anchors.rightMargin: 14
cellWidth: 40
cellHeight: 40
anchors.leftMargin: 30
anchors.rightMargin: 24
cellWidth: 60
cellHeight: 60
model: filteredModel
delegate: Image {
width: 36
height: 36
width: 52
height: 52
source: emoji36BaseURL + model.code.utf + ".png"
fillMode: Image.Pad
MouseArea {
hoverEnabled: enabled
anchors.fill: parent

View file

@ -140,6 +140,13 @@ function toggleReaction(reaction) {
});
} else {
beginReactionWrapper(reaction);
emoteAppBarWindow.sendToQml({
"source": "simplifiedEmote.js",
"method": "updateEmoteIndicator",
"data": {
"icon": reaction
}
});
}
}
@ -222,14 +229,6 @@ function onMessageFromEmoteAppBar(message) {
console.log("Unrecognized message from " + EMOTE_APP_BAR_MESSAGE_SOURCE + ": " + JSON.stringify(message));
break;
}
emoteAppBarWindow.sendToQml({
"source": "simplifiedEmote.js",
"method": "updateEmoteIndicator",
"data": {
"icon": message.method
}
});
}