Clean up reply.
This commit is contained in:
@@ -164,9 +164,7 @@ RowLayout {
|
|||||||
contextMenu.downloadAndOpen.connect(downloadAndOpen)
|
contextMenu.downloadAndOpen.connect(downloadAndOpen)
|
||||||
contextMenu.saveFileAs.connect(saveFileAs)
|
contextMenu.saveFileAs.connect(saveFileAs)
|
||||||
contextMenu.reply.connect(function() {
|
contextMenu.reply.connect(function() {
|
||||||
roomPanelInput.replyUser = author
|
roomPanelInput.replyModel = model
|
||||||
roomPanelInput.replyEventID = eventId
|
|
||||||
roomPanelInput.replyContent = message
|
|
||||||
roomPanelInput.isReply = true
|
roomPanelInput.isReply = true
|
||||||
roomPanelInput.focus()
|
roomPanelInput.focus()
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -158,9 +158,7 @@ RowLayout {
|
|||||||
contextMenu.downloadAndOpen.connect(downloadAndOpen)
|
contextMenu.downloadAndOpen.connect(downloadAndOpen)
|
||||||
contextMenu.saveFileAs.connect(saveFileAs)
|
contextMenu.saveFileAs.connect(saveFileAs)
|
||||||
contextMenu.reply.connect(function() {
|
contextMenu.reply.connect(function() {
|
||||||
roomPanelInput.replyUser = author
|
roomPanelInput.replyModel = model
|
||||||
roomPanelInput.replyEventID = eventId
|
|
||||||
roomPanelInput.replyContent = message
|
|
||||||
roomPanelInput.isReply = true
|
roomPanelInput.isReply = true
|
||||||
roomPanelInput.focus()
|
roomPanelInput.focus()
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -98,9 +98,7 @@ ColumnLayout {
|
|||||||
messageSourceDialog.createObject(ApplicationWindow.overlay, {"sourceText": toolTip}).open()
|
messageSourceDialog.createObject(ApplicationWindow.overlay, {"sourceText": toolTip}).open()
|
||||||
})
|
})
|
||||||
contextMenu.reply.connect(function() {
|
contextMenu.reply.connect(function() {
|
||||||
roomPanelInput.replyUser = author
|
roomPanelInput.replyModel = model
|
||||||
roomPanelInput.replyEventID = eventId
|
|
||||||
roomPanelInput.replyContent = contentLabel.selectedText || message
|
|
||||||
roomPanelInput.isReply = true
|
roomPanelInput.isReply = true
|
||||||
roomPanelInput.focus()
|
roomPanelInput.focus()
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -173,9 +173,7 @@ RowLayout {
|
|||||||
contextMenu.downloadAndOpen.connect(downloadAndOpen)
|
contextMenu.downloadAndOpen.connect(downloadAndOpen)
|
||||||
contextMenu.saveFileAs.connect(saveFileAs)
|
contextMenu.saveFileAs.connect(saveFileAs)
|
||||||
contextMenu.reply.connect(function() {
|
contextMenu.reply.connect(function() {
|
||||||
roomPanelInput.replyUser = author
|
roomPanelInput.replyModel = model
|
||||||
roomPanelInput.replyEventID = eventId
|
|
||||||
roomPanelInput.replyContent = message
|
|
||||||
roomPanelInput.isReply = true
|
roomPanelInput.isReply = true
|
||||||
roomPanelInput.focus()
|
roomPanelInput.focus()
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -13,9 +13,10 @@ import Spectral 0.1
|
|||||||
|
|
||||||
Control {
|
Control {
|
||||||
property alias isReply: replyItem.visible
|
property alias isReply: replyItem.visible
|
||||||
property var replyUser
|
property var replyModel
|
||||||
property string replyEventID
|
readonly property var replyUser: replyModel ? replyModel.author : null
|
||||||
property string replyContent
|
readonly property string replyEventID: replyModel ? replyModel.eventId : ""
|
||||||
|
readonly property string replyContent: replyModel ? replyModel.message : ""
|
||||||
|
|
||||||
property alias isAutoCompleting: autoCompleteListView.visible
|
property alias isAutoCompleting: autoCompleteListView.visible
|
||||||
property var autoCompleteModel
|
property var autoCompleteModel
|
||||||
@@ -452,9 +453,7 @@ Control {
|
|||||||
|
|
||||||
function clearReply() {
|
function clearReply() {
|
||||||
isReply = false
|
isReply = false
|
||||||
replyUser = null
|
replyModel = null
|
||||||
replyEventID = ""
|
|
||||||
replyContent = ""
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function focus() {
|
function focus() {
|
||||||
|
|||||||
Reference in New Issue
Block a user