2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

Show custom chat wallpapers in chats.

This commit is contained in:
John Preston
2023-04-17 13:43:08 +04:00
parent 5cbf9a2dc4
commit bf27185feb
20 changed files with 369 additions and 121 deletions

View File

@@ -16,6 +16,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_photo.h"
#include "data/data_emoji_statuses.h"
#include "data/data_user_names.h"
#include "data/data_wall_paper.h"
#include "data/notify/data_notify_settings.h"
#include "api/api_peer_photo.h"
#include "apiwrap.h"
@@ -462,6 +463,13 @@ void ApplyUserUpdate(not_null<UserData*> user, const MTPDuserFull &update) {
}
}
if (const auto paper = update.vwallpaper()) {
user->setWallPaper(
Data::WallPaper::Create(&user->session(), *paper));
} else {
user->setWallPaper({});
}
user->fullUpdated();
}