2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-05 00:46:08 +00:00

Remove flags checking for backgrounds.

Also limit image size to 2960px.

Fixes #5641.
This commit is contained in:
John Preston
2019-02-04 18:53:00 +03:00
parent b43191506a
commit 4d9464ed87
6 changed files with 46 additions and 36 deletions

View File

@@ -1629,14 +1629,17 @@ void MainWidget::checkChatBackground() {
return;
}
_background->generating = Data::ReadImageAsync(document, [=](
QImage &&image) {
const auto generateCallback = [=](QImage &&image) {
const auto background = base::take(_background);
const auto ready = image.isNull()
? Data::DefaultWallPaper()
: background->data;
setReadyChatBackground(ready, std::move(image));
});
};
_background->generating = Data::ReadImageAsync(
document,
Window::Theme::ProcessBackgroundImage,
generateCallback);
}
Image *MainWidget::newBackgroundThumb() {