diff --git a/imports/NeoChat/Component/Timeline/TextDelegate.qml b/imports/NeoChat/Component/Timeline/TextDelegate.qml index 87b17af9c..1a9c9306c 100644 --- a/imports/NeoChat/Component/Timeline/TextDelegate.qml +++ b/imports/NeoChat/Component/Timeline/TextDelegate.qml @@ -15,7 +15,7 @@ TextEdit { color: Kirigami.Theme.textColor - readonly property var isEmoji: /^(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])*$/ + readonly property var isEmoji: /^(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])+$/ font.pointSize: isEmoji.test(message) ? Kirigami.Theme.defaultFont.pointSize * 4 : Kirigami.Theme.defaultFont.pointSize selectByMouse: true diff --git a/src/messageeventmodel.cpp b/src/messageeventmodel.cpp index 1c2b60481..c5ee2d15d 100644 --- a/src/messageeventmodel.cpp +++ b/src/messageeventmodel.cpp @@ -287,6 +287,10 @@ QVariant MessageEventModel::data(const QModelIndex &idx, int role) const const auto &evt = isPending ? **pendingIt : **timelineIt; if (role == Qt::DisplayRole) { + if (evt.isRedacted()) { + auto reason = evt.redactedBecause()->reason(); + return (reason.isEmpty()) ? i18n("[This message was deleted]") : i18n("[This message was deleted: %1]").arg(evt.redactedBecause()->reason()); + } return m_currentRoom->eventToString(evt, Qt::RichText); }