mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Show custom chat wallpapers in chats.
This commit is contained in:
@@ -1093,6 +1093,22 @@ const QString &PeerData::themeEmoji() const {
|
||||
return _themeEmoticon;
|
||||
}
|
||||
|
||||
void PeerData::setWallPaper(std::optional<Data::WallPaper> paper) {
|
||||
if (!paper && !_wallPaper) {
|
||||
return;
|
||||
} else if (paper && _wallPaper && _wallPaper->equals(*paper)) {
|
||||
return;
|
||||
}
|
||||
_wallPaper = paper
|
||||
? std::make_unique<Data::WallPaper>(std::move(*paper))
|
||||
: nullptr;
|
||||
session().changes().peerUpdated(this, UpdateFlag::ChatWallPaper);
|
||||
}
|
||||
|
||||
const Data::WallPaper *PeerData::wallPaper() const {
|
||||
return _wallPaper.get();
|
||||
}
|
||||
|
||||
void PeerData::setIsBlocked(bool is) {
|
||||
const auto status = is
|
||||
? BlockStatus::Blocked
|
||||
|
||||
Reference in New Issue
Block a user