2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Moved proxy global variables from facades to core settings.

This commit is contained in:
23rd
2021-06-11 01:49:08 +03:00
parent 707b36dc12
commit 6d08542afa
24 changed files with 497 additions and 184 deletions

View File

@@ -9,6 +9,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "base/timer.h"
#include "base/object_ptr.h"
#include "core/core_settings.h"
#include "mtproto/connection_abstract.h"
#include "mtproto/mtproto_proxy_data.h"
@@ -28,7 +29,7 @@ namespace Main {
class Account;
} // namespace Main
class ProxiesBoxController : public base::Subscriber {
class ProxiesBoxController {
public:
using ProxyData = MTP::ProxyData;
using Type = ProxyData::Type;
@@ -110,6 +111,7 @@ private:
void addNewItem(const ProxyData &proxy);
const not_null<Main::Account*> _account;
Core::SettingsProxy &_settings;
int _idCounter = 0;
std::vector<Item> _list;
rpl::event_stream<ItemView> _views;
@@ -119,4 +121,6 @@ private:
ProxyData _lastSelectedProxy;
bool _lastSelectedProxyUsed = false;
rpl::lifetime _lifetime;
};