mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-02 18:21:53 +00:00
Update API scheme to layer 214. Start themes.
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user