mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 22:54:01 +02:00
Removed Adaptive namespace from Settings::Chat.
This commit is contained in:
parent
295a863d69
commit
9b488f03a1
3 changed files with 9 additions and 7 deletions
|
@ -34,6 +34,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "window/themes/window_themes_embedded.h"
|
||||
#include "window/themes/window_theme_editor_box.h"
|
||||
#include "window/themes/window_themes_cloud_list.h"
|
||||
#include "window/window_adaptive.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "storage/localstorage.h"
|
||||
|
@ -967,19 +968,15 @@ void SetupChatBackground(
|
|||
tile->setChecked(tiled);
|
||||
}, tile->lifetime());
|
||||
|
||||
adaptive->toggleOn(rpl::single(
|
||||
rpl::empty_value()
|
||||
) | rpl::then(base::ObservableViewer(
|
||||
Adaptive::Changed()
|
||||
)) | rpl::map([] {
|
||||
return (Global::AdaptiveChatLayout() == Adaptive::ChatLayout::Wide);
|
||||
adaptive->toggleOn(controller->adaptive().chatLayoutValue(
|
||||
) | rpl::map([](Window::AdaptiveModern::ChatLayout layout) {
|
||||
return (layout == Window::AdaptiveModern::ChatLayout::Wide);
|
||||
}));
|
||||
|
||||
adaptive->entity()->checkedChanges(
|
||||
) | rpl::start_with_next([=](bool checked) {
|
||||
Core::App().settings().setAdaptiveForWide(checked);
|
||||
Core::App().saveSettingsDelayed();
|
||||
Adaptive::Changed().notify();
|
||||
}, adaptive->lifetime());
|
||||
}
|
||||
|
||||
|
|
|
@ -36,6 +36,10 @@ rpl::producer<bool> AdaptiveModern::oneColumnValue() const {
|
|||
});
|
||||
}
|
||||
|
||||
rpl::producer<AdaptiveModern::ChatLayout> AdaptiveModern::chatLayoutValue() const {
|
||||
return _chatLayout.value();
|
||||
}
|
||||
|
||||
bool AdaptiveModern::isOneColumn() const {
|
||||
return _layout.current() == WindowLayout::OneColumn;
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@ public:
|
|||
|
||||
[[nodiscard]] rpl::producer<> changed() const;
|
||||
[[nodiscard]] rpl::producer<bool> oneColumnValue() const;
|
||||
[[nodiscard]] rpl::producer<ChatLayout> chatLayoutValue() const;
|
||||
|
||||
[[nodiscard]] bool isOneColumn() const;
|
||||
[[nodiscard]] bool isNormal() const;
|
||||
|
|
Loading…
Add table
Reference in a new issue