summary refs log tree commit diff
path: root/resources/qml/TimelineView.qml
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2024-03-08 18:43:59 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2024-03-08 18:45:18 +0100
commit7c2a152cfbc2197989f7d722deb961ac80269019 (patch)
tree1ff5bc7c938ceb2242a0d769f9f64ef5e980f683 /resources/qml/TimelineView.qml
parentFix buttons vanishing on the kde themes in the settings page (diff)
downloadnheko-7c2a152cfbc2197989f7d722deb961ac80269019.tar.xz
Add support for intentional mentions
This is still a bit flaky around when to remove a mention, but it should
work in most cases. Might add a toggle in the future to disable these
though.
Diffstat (limited to 'resources/qml/TimelineView.qml')
-rw-r--r--resources/qml/TimelineView.qml13
1 files changed, 10 insertions, 3 deletions
diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml

index 7bad53c4..085ca073 100644 --- a/resources/qml/TimelineView.qml +++ b/resources/qml/TimelineView.qml
@@ -148,9 +148,16 @@ Item { } UploadBox { } - MessageInputWarning { - text: qsTr("You are about to notify the whole room") - visible: (room && room.permissions.canPingRoom() && room.input.containsAtRoom) + Repeater { + model: room ? room.input.mentions : null + + MessageInputWarning { + required property string modelData + bubbleColor: modelData == "@room" ? Nheko.theme.error : Nheko.theme.orange + text: modelData == "@room" ? qsTr("You are about to notify the whole room") : qsTr("You will be mentioning %1").arg(modelData) + showRemove: true + onRemoveClicked: room.input.removeMention(modelData); + } } MessageInputWarning { text: qsTr("The command /%1 is not recognized and will be sent as part of your message").arg(room ? room.input.currentCommand : "")