@ -10,7 +10,7 @@ import "../"
Popup {
Popup {
function show ( showAt , room_id , event_id ) {
function show ( showAt , room_id , event_id ) {
console . debug ( "Showing emojiPicker for " + event_id + "in room " + room_id )
console . debug ( "Showing emojiPicker for " + event_id + "in room " + room_id )
parent = showAt
parent = showAt
x = Math . round ( ( showAt . width - width ) / 2 )
x = Math . round ( ( showAt . width - width ) / 2 )
@ -18,8 +18,7 @@ Popup {
emojiPopup . room_id = room_id
emojiPopup . room_id = room_id
emojiPopup . event_id = event_id
emojiPopup . event_id = event_id
open ( )
open ( )
}
}
signal picked ( string room_id , string event_id , string key )
property string room_id
property string room_id
property string event_id
property string event_id
@ -42,8 +41,6 @@ Popup {
focus: true
focus: true
closePolicy: Popup . CloseOnEscape | Popup . CloseOnPressOutside
closePolicy: Popup . CloseOnEscape | Popup . CloseOnPressOutside
onPicked: emojiPopup . close ( )
ColumnLayout {
ColumnLayout {
id: columnView
id: columnView
anchors.fill: parent
anchors.fill: parent
@ -106,7 +103,8 @@ Popup {
/ / T O D O : m a y b e a d d f a v o r i t e s a t s o m e p o i n t ?
/ / T O D O : m a y b e a d d f a v o r i t e s a t s o m e p o i n t ?
onClicked: {
onClicked: {
console . debug ( "Picked " + model . unicode + "in response to " + emojiPopup . event_id + " in room " + emojiPopup . room_id )
console . debug ( "Picked " + model . unicode + "in response to " + emojiPopup . event_id + " in room " + emojiPopup . room_id )
emojiPopup . picked ( emojiPopup . room_id , emojiPopup . event_id , model . unicode )
emojiPopup . close ( )
timelineManager . queueReactionMessage ( emojiPopup . room_id , emojiPopup . event_id , model . unicode )
}
}
}
}