From bd8cdcb520f310c97dcf6beb67e5f77c1cefd670 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 1 Nov 2022 16:20:51 +0400 Subject: [PATCH] Fix topic icons animating in choose topic box. --- .../SourceFiles/boxes/peer_list_controllers.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Telegram/SourceFiles/boxes/peer_list_controllers.cpp b/Telegram/SourceFiles/boxes/peer_list_controllers.cpp index 84d933635..3df3f8a9c 100644 --- a/Telegram/SourceFiles/boxes/peer_list_controllers.cpp +++ b/Telegram/SourceFiles/boxes/peer_list_controllers.cpp @@ -694,6 +694,19 @@ void ChooseTopicBoxController::prepare() { setSearchNoResultsText(tr::lng_blocked_list_not_found(tr::now)); delegate()->peerListSetSearchMode(PeerListSearchMode::Enabled); refreshRows(true); + + session().changes().entryUpdates( + Data::EntryUpdate::Flag::Repaint + ) | rpl::start_with_next([=](const Data::EntryUpdate &update) { + if (const auto topic = update.entry->asTopic()) { + if (topic->forum() == _forum) { + const auto id = topic->rootId().bare; + if (const auto row = delegate()->peerListFindRow(id)) { + delegate()->peerListUpdateRow(row); + } + } + } + }, lifetime()); } void ChooseTopicBoxController::refreshRows(bool initial) {