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

Use color index from API.

This commit is contained in:
John Preston
2023-10-16 13:52:08 +04:00
parent f90a010b84
commit 4b6107fa56
26 changed files with 282 additions and 149 deletions

View File

@@ -705,6 +705,9 @@ not_null<UserData*> Session::processUser(const MTPUser &data) {
if (canShareThisContact != result->canShareThisContactFast()) {
flags |= UpdateFlag::CanShareContact;
}
if (result->changeColorIndex(uint8(data.vcolor().v))) {
flags |= UpdateFlag::Color;
}
});
if (minimal) {
@@ -979,6 +982,9 @@ not_null<PeerData*> Session::processChat(const MTPChat &data) {
if (wasCallNotEmpty != Data::ChannelHasActiveCall(channel)) {
flags |= UpdateFlag::GroupCall;
}
if (result->changeColorIndex(uint8(data.vcolor().v))) {
flags |= UpdateFlag::Color;
}
}, [&](const MTPDchannelForbidden &data) {
const auto channel = result->asChannel();