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:
@@ -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([=] {
|
||||
|
Reference in New Issue
Block a user