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

Use rpl for Window::Theme::Background updates.

This commit is contained in:
John Preston
2021-07-15 14:12:38 +03:00
parent 7e83088a84
commit 4276b6cce0
66 changed files with 203 additions and 262 deletions

View File

@@ -99,12 +99,10 @@ private:
};
ServiceCheck::Generator::Generator() {
*_lifetime.make_state<base::Subscription>() = Window::Theme::Background(
)->add_subscription([=](const Window::Theme::BackgroundUpdate &update) {
if (update.paletteChanged()) {
invalidate();
}
});
style::PaletteChanged(
) | rpl::start_with_next([=] {
invalidate();
}, _lifetime);
}
auto ServiceCheck::Generator::framesForStyle(