2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Remove MTP from requestWallPaper interface.

This commit is contained in:
John Preston
2022-08-10 15:24:42 +03:00
parent e9fd249c5a
commit ab3d3a449b
3 changed files with 6 additions and 6 deletions

View File

@@ -992,7 +992,7 @@ rpl::producer<bool> ApiWrap::dialogsLoadBlockedByDate() const {
void ApiWrap::requestWallPaper(
const QString &slug,
Fn<void(const Data::WallPaper &)> done,
Fn<void(const MTP::Error &)> fail) {
Fn<void()> fail) {
if (_wallPaperSlug != slug) {
_wallPaperSlug = slug;
if (_wallPaperRequestId) {
@@ -1014,13 +1014,13 @@ void ApiWrap::requestWallPaper(
done(*paper);
}
} else if (const auto fail = base::take(_wallPaperFail)) {
fail(MTP::Error::Local("BAD_DOCUMENT", "In a wallpaper."));
fail();
}
}).fail([=](const MTP::Error &error) {
_wallPaperRequestId = 0;
_wallPaperSlug = QString();
if (const auto fail = base::take(_wallPaperFail)) {
fail(error);
fail();
}
}).send();
}