mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 07:33:52 +02:00
Removed Adaptive namespace and related global variables from facades.
This commit is contained in:
parent
9669a8a44a
commit
5b4d442799
2 changed files with 0 additions and 44 deletions
|
@ -339,9 +339,6 @@ namespace internal {
|
||||||
|
|
||||||
struct Data {
|
struct Data {
|
||||||
bool ScreenIsLocked = false;
|
bool ScreenIsLocked = false;
|
||||||
Adaptive::WindowLayout AdaptiveWindowLayout = Adaptive::WindowLayout::Normal;
|
|
||||||
Adaptive::ChatLayout AdaptiveChatLayout = Adaptive::ChatLayout::Normal;
|
|
||||||
base::Observable<void> AdaptiveChanged;
|
|
||||||
|
|
||||||
bool TryIPv6 = !Platform::IsWindows();
|
bool TryIPv6 = !Platform::IsWindows();
|
||||||
std::vector<MTP::ProxyData> ProxiesList;
|
std::vector<MTP::ProxyData> ProxiesList;
|
||||||
|
@ -374,9 +371,6 @@ void finish() {
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineVar(Global, bool, ScreenIsLocked);
|
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, bool, TryIPv6);
|
||||||
DefineVar(Global, std::vector<MTP::ProxyData>, ProxiesList);
|
DefineVar(Global, std::vector<MTP::ProxyData>, ProxiesList);
|
||||||
|
|
|
@ -89,21 +89,6 @@ bool switchInlineBotButtonReceived(
|
||||||
#define DeclareVar(Type, Name) DeclareRefVar(Type, Name) \
|
#define DeclareVar(Type, Name) DeclareRefVar(Type, Name) \
|
||||||
void Set##Name(const 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 {
|
namespace Global {
|
||||||
|
|
||||||
bool started();
|
bool started();
|
||||||
|
@ -111,9 +96,6 @@ void start();
|
||||||
void finish();
|
void finish();
|
||||||
|
|
||||||
DeclareVar(bool, ScreenIsLocked);
|
DeclareVar(bool, ScreenIsLocked);
|
||||||
DeclareVar(Adaptive::ChatLayout, AdaptiveChatLayout);
|
|
||||||
DeclareVar(Adaptive::WindowLayout, AdaptiveWindowLayout);
|
|
||||||
DeclareRefVar(base::Observable<void>, AdaptiveChanged);
|
|
||||||
|
|
||||||
DeclareVar(bool, TryIPv6);
|
DeclareVar(bool, TryIPv6);
|
||||||
DeclareVar(std::vector<MTP::ProxyData>, ProxiesList);
|
DeclareVar(std::vector<MTP::ProxyData>, ProxiesList);
|
||||||
|
@ -125,23 +107,3 @@ DeclareRefVar(base::Observable<void>, ConnectionTypeChanged);
|
||||||
DeclareRefVar(base::Variable<DBIWorkMode>, WorkMode);
|
DeclareRefVar(base::Variable<DBIWorkMode>, WorkMode);
|
||||||
|
|
||||||
} // namespace Global
|
} // 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
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue