summary refs log tree commit diff
path: root/src/timeline
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2022-03-07 20:30:14 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2022-03-07 20:30:14 +0100
commitfd041ce58dd827ce5e15de79e5bcf8044d89dc6d (patch)
tree1ab9bd723cd5e7b8c602b728761d63441284c48c /src/timeline
parentTranslated using Weblate (Estonian) (diff)
parentFix server switching to https after bootstrap (diff)
downloadnheko-fd041ce58dd827ce5e15de79e5bcf8044d89dc6d.tar.xz
Fix weblate conflicts
Diffstat (limited to 'src/timeline')
-rw-r--r--src/timeline/EventStore.cpp2
-rw-r--r--src/timeline/TimelineModel.cpp8
-rw-r--r--src/timeline/TimelineModel.h2
3 files changed, 7 insertions, 5 deletions
diff --git a/src/timeline/EventStore.cpp b/src/timeline/EventStore.cpp

index 4151356f..1293245c 100644 --- a/src/timeline/EventStore.cpp +++ b/src/timeline/EventStore.cpp
@@ -208,7 +208,7 @@ EventStore::EventStore(std::string room_id, QObject *) size_t index = related_text->content.formatted_body.find(txn_id); if (index != std::string::npos) { related_text->content.formatted_body.replace( - index, event_id.length(), event_id); + index, txn_id.length(), event_id); } } diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp
index 903f137f..8e6c7235 100644 --- a/src/timeline/TimelineModel.cpp +++ b/src/timeline/TimelineModel.cpp
@@ -1240,7 +1240,7 @@ TimelineModel::showReadReceipts(QString id) } void -TimelineModel::redactEvent(const QString &id) +TimelineModel::redactEvent(const QString &id, const QString &reason) { if (!id.isEmpty()) { auto edits = events.edits(id.toStdString()); @@ -1255,7 +1255,8 @@ TimelineModel::redactEvent(const QString &id) } emit dataAtIdChanged(id); - }); + }, + reason.toStdString()); // redact all edits to prevent leaks for (const auto &e : edits) { @@ -1271,7 +1272,8 @@ TimelineModel::redactEvent(const QString &id) } emit dataAtIdChanged(id); - }); + }, + reason.toStdString()); } } } diff --git a/src/timeline/TimelineModel.h b/src/timeline/TimelineModel.h
index e4e3fa9d..f47203f0 100644 --- a/src/timeline/TimelineModel.h +++ b/src/timeline/TimelineModel.h
@@ -272,7 +272,7 @@ public: Q_INVOKABLE void unpin(const QString &id); Q_INVOKABLE void pin(const QString &id); Q_INVOKABLE void showReadReceipts(QString id); - Q_INVOKABLE void redactEvent(const QString &id); + Q_INVOKABLE void redactEvent(const QString &id, const QString &reason = ""); Q_INVOKABLE int idToIndex(const QString &id) const; Q_INVOKABLE QString indexToId(int index) const; Q_INVOKABLE void openMedia(const QString &eventId);