Implement replying to event in backend
This commit is contained in:
@@ -22,6 +22,7 @@ Item {
|
||||
property bool ready: Boolean(userInfo && roomInfo)
|
||||
property bool longLoading: false
|
||||
|
||||
property string replyToEventId: ""
|
||||
property string replyToUserId: ""
|
||||
property string replyToDisplayName: ""
|
||||
|
||||
|
@@ -69,9 +69,11 @@ HColumnPage {
|
||||
}
|
||||
|
||||
ReplyBar {
|
||||
replyToEventId: chat.replyToEventId
|
||||
replyToUserId: chat.replyToUserId
|
||||
replyToDisplayName: chat.replyToDisplayName
|
||||
onCancel: {
|
||||
chat.replyToEventId = ""
|
||||
chat.replyToUserId = ""
|
||||
chat.replyToDisplayName = ""
|
||||
}
|
||||
|
@@ -188,7 +188,7 @@ Rectangle {
|
||||
|
||||
if (textArea.text === "") { return }
|
||||
|
||||
const args = [chat.roomId, toSend]
|
||||
const args = [chat.roomId, toSend, chat.replyToEventId]
|
||||
py.callClientCoro(writingUserId, "send_text", args)
|
||||
|
||||
area.clear()
|
||||
|
@@ -9,7 +9,7 @@ InfoBar {
|
||||
icon.svgName: "reply-to"
|
||||
label.textFormat: Text.StyledText
|
||||
label.text:
|
||||
replyToUserId ?
|
||||
replyToEventId ?
|
||||
utils.coloredNameHtml(replyToDisplayName, replyToUserId) :
|
||||
""
|
||||
|
||||
@@ -17,6 +17,7 @@ InfoBar {
|
||||
signal cancel()
|
||||
|
||||
|
||||
property string replyToEventId: ""
|
||||
property string replyToUserId: ""
|
||||
property string replyToDisplayName: ""
|
||||
|
||||
@@ -25,9 +26,6 @@ InfoBar {
|
||||
backgroundColor: "transparent"
|
||||
icon.name: "reply-cancel"
|
||||
icon.color: theme.colors.negativeBackground
|
||||
// iconItem.small: true
|
||||
// topPadding: 0
|
||||
// bottomPadding: topPadding
|
||||
onClicked: cancel()
|
||||
|
||||
Layout.fillHeight: true
|
||||
|
@@ -233,6 +233,7 @@ HColumnLayout {
|
||||
text: qsTr("Reply")
|
||||
|
||||
onTriggered: {
|
||||
chat.replyToEventId = model.id
|
||||
chat.replyToUserId = model.sender_id
|
||||
chat.replyToDisplayName = model.sender_name
|
||||
}
|
||||
|
Reference in New Issue
Block a user