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