mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-01 23:25:15 +00:00
Use rpl for Window::Theme::Background updates.
This commit is contained in:
@@ -98,9 +98,12 @@ MainWindow::MainWindow(not_null<Window::Controller*> controller)
|
||||
|
||||
setLocale(QLocale(QLocale::English, QLocale::UnitedStates));
|
||||
|
||||
subscribe(Window::Theme::Background(), [this](const Window::Theme::BackgroundUpdate &data) {
|
||||
using Window::Theme::BackgroundUpdate;
|
||||
Window::Theme::Background()->updates(
|
||||
) | rpl::start_with_next([=](const BackgroundUpdate &data) {
|
||||
themeUpdated(data);
|
||||
});
|
||||
}, lifetime());
|
||||
|
||||
Core::App().passcodeLockChanges(
|
||||
) | rpl::start_with_next([=] {
|
||||
updateGlobalMenu();
|
||||
@@ -571,7 +574,7 @@ void MainWindow::themeUpdated(const Window::Theme::BackgroundUpdate &data) {
|
||||
using Type = Window::Theme::BackgroundUpdate::Type;
|
||||
|
||||
// We delay animating theme warning because we want all other
|
||||
// subscribers to receive paltte changed notification before any
|
||||
// subscribers to receive palette changed notification before any
|
||||
// animations (that include pixmap caches with old palette values).
|
||||
if (data.type == Type::TestingTheme) {
|
||||
if (!_testingThemeWarning) {
|
||||
|
Reference in New Issue
Block a user