Show correct profile colors preview when edit.

This commit is contained in:
John Preston
2026-01-29 17:04:31 +04:00
parent e4c7d62012
commit 46cb49865a
2 changed files with 4 additions and 6 deletions
@@ -2241,7 +2241,9 @@ void EditPeerProfileColorSection(
? std::nullopt
: std::make_optional(state->patternEmojiId.current()));
};
setIndex(peer->colorProfileIndex().value_or(kUnsetColorIndex));
setIndex(peer->emojiStatusId().collectible
? kUnsetColorIndex
: peer->colorProfileIndex().value_or(kUnsetColorIndex));
const auto margin = st::settingsColorRadioMargin;
const auto skip = st::settingsColorRadioSkip;
@@ -1405,11 +1405,7 @@ void TopBar::setPatternEmojiId(std::optional<DocumentId> patternEmojiId) {
void TopBar::setLocalEmojiStatusId(EmojiStatusId emojiStatusId) {
_localCollectible = emojiStatusId.collectible;
if (!emojiStatusId.collectible) {
_badgeContent = Badge::Content{ BadgeType::Premium, emojiStatusId };
} else {
_badgeContent = BadgeContentForPeer(_peer);
}
_badgeContent = Badge::Content{ BadgeType::Premium, emojiStatusId };
updateCollectibleStatus();
}