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

Fix applying background after theme edit.

This commit is contained in:
John Preston
2019-09-10 00:36:16 +03:00
parent dfd63e66ff
commit ca45fb617e
4 changed files with 29 additions and 10 deletions

View File

@@ -1202,7 +1202,8 @@ void KeepFromEditor(
const ParsedTheme &originalParsed,
const Data::CloudTheme &cloud,
const QByteArray &themeContent,
const ParsedTheme &themeParsed) {
const ParsedTheme &themeParsed,
const QImage &background) {
ClearApplying();
const auto content = themeContent.isEmpty()
? originalContent
@@ -1223,6 +1224,11 @@ void KeepFromEditor(
cloud.documentId);
Local::writeTheme(saved);
Background()->keepApplied(saved.object, true);
Background()->setThemeData(
base::duplicate(background),
themeParsed.tiled);
Background()->set(Data::ThemeWallPaper());
Background()->writeNewBackgroundSettings();
}
void Revert() {