Re-add pending event indicator
This seems to have been accidentally removed BUG: 491277
This commit is contained in:
@@ -74,6 +74,8 @@ QQC2.Control {
|
|||||||
*/
|
*/
|
||||||
property real maxContentWidth: -1
|
property real maxContentWidth: -1
|
||||||
|
|
||||||
|
required property bool isPending
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief The reply has been clicked.
|
* @brief The reply has been clicked.
|
||||||
*/
|
*/
|
||||||
@@ -89,29 +91,43 @@ QQC2.Control {
|
|||||||
*/
|
*/
|
||||||
signal showMessageMenu
|
signal showMessageMenu
|
||||||
|
|
||||||
contentItem: ColumnLayout {
|
contentItem: RowLayout {
|
||||||
id: contentColumn
|
Kirigami.Icon {
|
||||||
spacing: Kirigami.Units.smallSpacing
|
source: "content-loading-symbolic"
|
||||||
Repeater {
|
Layout.preferredWidth: Kirigami.Units.iconSizes.small
|
||||||
id: contentRepeater
|
Layout.preferredHeight: Kirigami.Units.iconSizes.small
|
||||||
model: root.contentModel
|
visible: root.isPending && NeoChatConfig.showLocalMessagesOnRight
|
||||||
delegate: MessageComponentChooser {
|
}
|
||||||
room: root.room
|
ColumnLayout {
|
||||||
index: root.index
|
id: contentColumn
|
||||||
actionsHandler: root.actionsHandler
|
spacing: Kirigami.Units.smallSpacing
|
||||||
timeline: root.timeline
|
Repeater {
|
||||||
maxContentWidth: root.maxContentWidth
|
id: contentRepeater
|
||||||
|
model: root.contentModel
|
||||||
|
delegate: MessageComponentChooser {
|
||||||
|
room: root.room
|
||||||
|
index: root.index
|
||||||
|
actionsHandler: root.actionsHandler
|
||||||
|
timeline: root.timeline
|
||||||
|
maxContentWidth: root.maxContentWidth
|
||||||
|
|
||||||
onReplyClicked: eventId => {
|
onReplyClicked: eventId => {
|
||||||
root.replyClicked(eventId);
|
root.replyClicked(eventId);
|
||||||
|
}
|
||||||
|
onSelectedTextChanged: selectedText => {
|
||||||
|
root.selectedTextChanged(selectedText);
|
||||||
|
}
|
||||||
|
onShowMessageMenu: root.showMessageMenu()
|
||||||
|
onRemoveLinkPreview: index => root.contentModel.closeLinkPreview(index)
|
||||||
}
|
}
|
||||||
onSelectedTextChanged: selectedText => {
|
|
||||||
root.selectedTextChanged(selectedText);
|
|
||||||
}
|
|
||||||
onShowMessageMenu: root.showMessageMenu()
|
|
||||||
onRemoveLinkPreview: index => root.contentModel.closeLinkPreview(index)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Kirigami.Icon {
|
||||||
|
source: "content-loading-symbolic"
|
||||||
|
Layout.preferredWidth: Kirigami.Units.iconSizes.small
|
||||||
|
Layout.preferredHeight: Kirigami.Units.iconSizes.small
|
||||||
|
visible: root.isPending && !NeoChatConfig.showLocalMessagesOnRight
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
background: Kirigami.ShadowedRectangle {
|
background: Kirigami.ShadowedRectangle {
|
||||||
|
|||||||
@@ -288,6 +288,8 @@ TimelineDelegate {
|
|||||||
|
|
||||||
showHighlight: root.showHighlight
|
showHighlight: root.showHighlight
|
||||||
|
|
||||||
|
isPending: root.isPending
|
||||||
|
|
||||||
onReplyClicked: eventId => {
|
onReplyClicked: eventId => {
|
||||||
root.replyClicked(eventId);
|
root.replyClicked(eventId);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user