Skip to content

Commit

Permalink
wip colors
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston committed Nov 13, 2023
1 parent eebb569 commit 2de74b0
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Telegram/SourceFiles/data/data_session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1373,6 +1373,20 @@ not_null<PeerData*> Session::processPeer(const TLchat &dialog) {
session().sendAsPeers().setChosen(result, peerFromSender(*sender));
}

auto decorationsUpdated = false;
if (result->changeColorIndex(data.vaccent_color_id().v)) {
updates |= UpdateFlag::Color;
decorationsUpdated = true;
}
if (result->changeBackgroundEmojiId(
data.vbackground_custom_emoji_id().v)) {
updates |= UpdateFlag::BackgroundEmoji;
decorationsUpdated = true;
}
if (decorationsUpdated && result->isMinimalLoaded()) {
_peerDecorationsUpdated.fire_copy(result);
}

if (!result->isFullLoaded()) {
result->setLoadedStatus(PeerData::LoadedStatus::Full);
}
Expand Down

0 comments on commit 2de74b0

Please sign in to comment.