Fix reverting edited theme values.

This commit is contained in:
John Preston 2019-09-06 19:29:10 +03:00
parent 32287a51f9
commit a773ad7b02
2 changed files with 6 additions and 2 deletions

View File

@ -363,12 +363,15 @@ Editor::Inner::Inner(QWidget *parent, const QString &path) : TWidget(parent)
}
});
subscribe(Background(), [this](const BackgroundUpdate &update) {
if (_applyingUpdate) return;
if (_applyingUpdate || !Background()->editingTheme()) {
return;
}
if (update.type == BackgroundUpdate::Type::TestingTheme) {
Revert();
App::CallDelayed(st::slideDuration, this, [] {
Ui::show(Box<InformBox>(tr::lng_theme_editor_cant_change_theme(tr::now)));
Ui::show(Box<InformBox>(
tr::lng_theme_editor_cant_change_theme(tr::now)));
});
}
});

View File

@ -546,6 +546,7 @@ void CloudList::refreshColorsFromDocument(
colors->background = ColorsFromCurrentTheme().background;
}
element.check->setColors(*colors);
setWaiting(element, false);
}
void CloudList::subscribeToDownloadFinished() {