Fix topic icons animating in choose topic box.

This commit is contained in:
John Preston 2022-11-01 16:20:51 +04:00
parent 7dbb4a0959
commit bd8cdcb520
1 changed files with 13 additions and 0 deletions

View File

@ -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) {