Removed Adaptive namespace and related global variables from facades.

This commit is contained in:
23rd 2021-05-27 03:45:38 +03:00
parent 9669a8a44a
commit 5b4d442799
2 changed files with 0 additions and 44 deletions

View File

@ -339,9 +339,6 @@ namespace internal {
struct Data {
bool ScreenIsLocked = false;
Adaptive::WindowLayout AdaptiveWindowLayout = Adaptive::WindowLayout::Normal;
Adaptive::ChatLayout AdaptiveChatLayout = Adaptive::ChatLayout::Normal;
base::Observable<void> AdaptiveChanged;
bool TryIPv6 = !Platform::IsWindows();
std::vector<MTP::ProxyData> ProxiesList;
@ -374,9 +371,6 @@ void finish() {
}
DefineVar(Global, bool, ScreenIsLocked);
DefineVar(Global, Adaptive::WindowLayout, AdaptiveWindowLayout);
DefineVar(Global, Adaptive::ChatLayout, AdaptiveChatLayout);
DefineRefVar(Global, base::Observable<void>, AdaptiveChanged);
DefineVar(Global, bool, TryIPv6);
DefineVar(Global, std::vector<MTP::ProxyData>, ProxiesList);

View File

@ -89,21 +89,6 @@ bool switchInlineBotButtonReceived(
#define DeclareVar(Type, Name) DeclareRefVar(Type, Name) \
void Set##Name(const Type &Name);
namespace Adaptive {
enum class WindowLayout {
OneColumn,
Normal,
ThreeColumn,
};
enum class ChatLayout {
Normal,
Wide,
};
} // namespace Adaptive
namespace Global {
bool started();
@ -111,9 +96,6 @@ void start();
void finish();
DeclareVar(bool, ScreenIsLocked);
DeclareVar(Adaptive::ChatLayout, AdaptiveChatLayout);
DeclareVar(Adaptive::WindowLayout, AdaptiveWindowLayout);
DeclareRefVar(base::Observable<void>, AdaptiveChanged);
DeclareVar(bool, TryIPv6);
DeclareVar(std::vector<MTP::ProxyData>, ProxiesList);
@ -125,23 +107,3 @@ DeclareRefVar(base::Observable<void>, ConnectionTypeChanged);
DeclareRefVar(base::Variable<DBIWorkMode>, WorkMode);
} // namespace Global
namespace Adaptive {
inline base::Observable<void> &Changed() {
return Global::RefAdaptiveChanged();
}
inline bool OneColumn() {
return Global::AdaptiveWindowLayout() == WindowLayout::OneColumn;
}
inline bool Normal() {
return Global::AdaptiveWindowLayout() == WindowLayout::Normal;
}
inline bool ThreeColumn() {
return Global::AdaptiveWindowLayout() == WindowLayout::ThreeColumn;
}
} // namespace Adaptive