From 33a8628059afc2799c3d3fff032baf5b5b8a592f Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Tue, 3 Apr 2018 10:24:35 +0300 Subject: [PATCH] Update the room list after a redacted event has been removed fixes #286 --- Makefile | 1 - src/timeline/TimelineView.cc | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a8ba1826..a8478105 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,6 @@ debug: @cmake -H. -GNinja -Bbuild -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=1 @cmake --build build - @cp build/compile_commands.json . ci: @cmake -H. -GNinja -Bbuild -DCMAKE_BUILD_TYPE=RelWithDebInfo diff --git a/src/timeline/TimelineView.cc b/src/timeline/TimelineView.cc index a00f4df5..d18c1cff 100644 --- a/src/timeline/TimelineView.cc +++ b/src/timeline/TimelineView.cc @@ -770,6 +770,10 @@ TimelineView::removeEvent(const QString &event_id) // Finally remove the event. removedItem->deleteLater(); eventIds_.remove(event_id); + + // Update the room list with a view of the last message after + // all events have been processed. + QTimer::singleShot(0, this, [this]() { notifyForLastEvent(); }); } QWidget *