Re-add pending event indicator

This seems to have been accidentally removed

BUG: 491277
This commit is contained in:
Tobias Fella
2024-08-06 22:01:25 +02:00
parent 75e9eee3a9
commit 776807580a
2 changed files with 37 additions and 19 deletions

View File

@@ -74,6 +74,8 @@ QQC2.Control {
*/
property real maxContentWidth: -1
required property bool isPending
/**
* @brief The reply has been clicked.
*/
@@ -89,29 +91,43 @@ QQC2.Control {
*/
signal showMessageMenu
contentItem: ColumnLayout {
id: contentColumn
spacing: Kirigami.Units.smallSpacing
Repeater {
id: contentRepeater
model: root.contentModel
delegate: MessageComponentChooser {
room: root.room
index: root.index
actionsHandler: root.actionsHandler
timeline: root.timeline
maxContentWidth: root.maxContentWidth
contentItem: RowLayout {
Kirigami.Icon {
source: "content-loading-symbolic"
Layout.preferredWidth: Kirigami.Units.iconSizes.small
Layout.preferredHeight: Kirigami.Units.iconSizes.small
visible: root.isPending && NeoChatConfig.showLocalMessagesOnRight
}
ColumnLayout {
id: contentColumn
spacing: Kirigami.Units.smallSpacing
Repeater {
id: contentRepeater
model: root.contentModel
delegate: MessageComponentChooser {
room: root.room
index: root.index
actionsHandler: root.actionsHandler
timeline: root.timeline
maxContentWidth: root.maxContentWidth
onReplyClicked: eventId => {
root.replyClicked(eventId);
onReplyClicked: 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 {

View File

@@ -288,6 +288,8 @@ TimelineDelegate {
showHighlight: root.showHighlight
isPending: root.isPending
onReplyClicked: eventId => {
root.replyClicked(eventId);
}