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

Update default chat background.

This commit is contained in:
John Preston
2021-08-31 22:10:39 +03:00
parent d29a1f5cd2
commit f59db10267
11 changed files with 110 additions and 47 deletions

View File

@@ -682,12 +682,13 @@ bool readBackground() {
const auto isOldEmptyImage = (bg.stream.status() != QDataStream::Ok);
if (isOldEmptyImage
|| Data::IsLegacy1DefaultWallPaper(*paper)
|| (Data::IsLegacy2DefaultWallPaper(*paper) && bg.version < 2008012)
|| (Data::IsLegacy2DefaultWallPaper(*paper) && bg.version < 3000000)
|| (Data::IsLegacy3DefaultWallPaper(*paper) && bg.version < 3000000)
|| (Data::IsLegacy4DefaultWallPaper(*paper) && bg.version < 3000000)
|| Data::IsDefaultWallPaper(*paper)) {
_backgroundCanWrite = false;
if (isOldEmptyImage || bg.version < 2008012) {
if (isOldEmptyImage || bg.version < 3000000) {
Window::Theme::Background()->set(Data::DefaultWallPaper());
Window::Theme::Background()->setTile(false);
} else {
Window::Theme::Background()->set(*paper);
}