1 files changed, 12 insertions, 0 deletions
diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp
index e8a0a507..d85a9516 100644
--- a/src/timeline/TimelineModel.cpp
+++ b/src/timeline/TimelineModel.cpp
@@ -521,6 +521,8 @@ TimelineModel::TimelineModel(TimelineViewManager *manager, QString room_id, QObj
cache::client()->updateState(room_id_.toStdString(), events_, true);
this->syncState({std::move(events_.events)});
});
+
+ connect(this, &TimelineModel::ignoredUser, this, &TimelineModel::handleIgnoredUser);
}
QHash<int, QByteArray>
@@ -2221,6 +2223,16 @@ TimelineModel::scrollTimerEvent()
}
void
+TimelineModel::handleIgnoredUser(const QString &id, const std::optional<QString> &err)
+{
+ if (err) {
+ MainWindow::instance()->showNotification(tr("Failed to ignore \"%1\": %2").arg(id, *err));
+ } else {
+ this->clearTimeline();
+ }
+}
+
+void
TimelineModel::requestKeyForEvent(const QString &id)
{
auto encrypted_event = events.get(id.toStdString(), "", false);
|