2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Move background to global settings.

This commit is contained in:
John Preston
2020-06-19 19:14:55 +04:00
parent 5433c16244
commit 2635ca33f8
16 changed files with 359 additions and 264 deletions

View File

@@ -2896,8 +2896,12 @@ void ApiWrap::refreshFileReference(
MTPmessages_GetSavedGifs(MTP_int(0)),
[=] { crl::on_main(_session, [=] { local().writeSavedGifs(); }); });
}, [&](Data::FileOriginWallpaper data) {
request(MTPaccount_GetWallPaper(
MTP_inputWallPaper(
const auto useSlug = data.ownerId
&& (data.ownerId != session().userId())
&& !data.slug.isEmpty();
request(MTPaccount_GetWallPaper(useSlug
? MTP_inputWallPaperSlug(MTP_string(data.slug))
: MTP_inputWallPaper(
MTP_long(data.paperId),
MTP_long(data.accessHash))));
}, [&](Data::FileOriginTheme data) {