Update API scheme to layer 214. Start themes.

This commit is contained in:
John Preston
2025-08-26 18:03:15 +04:00
parent 4ed266780a
commit 9e8ae54821
22 changed files with 426 additions and 103 deletions
+11 -13
View File
@@ -1736,24 +1736,22 @@ PeerId PeerData::groupCallDefaultJoinAs() const {
return 0;
}
void PeerData::setThemeEmoji(const QString &emoticon) {
if (_themeEmoticon == emoticon) {
void PeerData::setThemeToken(const QString &token) {
if (_themeToken == token) {
return;
} else if (Ui::Emoji::Find(_themeToken) == Ui::Emoji::Find(token)) {
_themeToken = token;
return;
}
if (Ui::Emoji::Find(_themeEmoticon) == Ui::Emoji::Find(emoticon)) {
_themeEmoticon = emoticon;
return;
_themeToken = token;
if (!token.isEmpty() && !owner().cloudThemes().themeForToken(token)) {
owner().cloudThemes().refreshChatThemesFor(token);
}
_themeEmoticon = emoticon;
if (!emoticon.isEmpty()
&& !owner().cloudThemes().themeForEmoji(emoticon)) {
owner().cloudThemes().refreshChatThemes();
}
session().changes().peerUpdated(this, UpdateFlag::ChatThemeEmoji);
session().changes().peerUpdated(this, UpdateFlag::ChatThemeToken);
}
const QString &PeerData::themeEmoji() const {
return _themeEmoticon;
const QString &PeerData::themeToken() const {
return _themeToken;
}
void PeerData::setWallPaper(