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

@@ -13,7 +13,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "base/platform/base_platform_info.h"
#include "ui/platform/ui_platform_utility.h"
#include "history/history.h"
#include "window/themes/window_theme.h"
#include "window/window_session_controller.h"
#include "window/window_lock_widgets.h"
#include "window/window_outdated_bar.h"
@@ -165,12 +164,10 @@ MainWindow::MainWindow(not_null<Controller*> controller)
, _outdated(CreateOutdatedBar(this))
, _body(this)
, _titleText(qsl("Telegram")) {
subscribe(Theme::Background(), [=](
const Theme::BackgroundUpdate &data) {
if (data.paletteChanged()) {
updatePalette();
}
});
style::PaletteChanged(
) | rpl::start_with_next([=] {
updatePalette();
}, lifetime());
Core::App().unreadBadgeChanges(
) | rpl::start_with_next([=] {