2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Animate topic icons only twice in topics list.

This commit is contained in:
John Preston
2022-11-07 14:25:43 +04:00
parent d8a0497a7e
commit 6e606f3bb6
6 changed files with 81 additions and 7 deletions

View File

@@ -15,6 +15,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_session.h"
#include "data/data_folder.h"
#include "data/data_forum.h"
#include "data/data_forum_icons.h"
#include "data/data_location.h"
#include "data/data_histories.h"
#include "data/data_group_call.h"
@@ -164,8 +165,9 @@ void ChannelData::setFlags(ChannelDataFlags which) {
const auto taken = ((diff & Flag::Forum) && !(which & Flag::Forum))
? mgInfo->takeForumData()
: nullptr;
if ((diff & Flag::Forum) && (which & Flag::Forum)) {
if (const auto raw = taken.get()) {
owner().forumIcons().clearUserpicsReset(taken.get());
} else if ((diff & Flag::Forum) && (which & Flag::Forum)) {
mgInfo->ensureForum(this);
}
_flags.set(which);