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

Display connecting/online proxy state.

This commit is contained in:
John Preston
2018-04-30 20:11:36 +04:00
parent f794d8dbd8
commit df4daca15b
4 changed files with 41 additions and 17 deletions

View File

@@ -92,7 +92,7 @@ private:
};
class ProxiesBoxController {
class ProxiesBoxController : public base::Subscriber {
public:
ProxiesBoxController();
@@ -125,6 +125,7 @@ public:
object_ptr<BoxContent> addNewItemBox();
bool setProxyEnabled(bool enabled);
void setTryIPv6(bool enabled);
rpl::producer<bool> proxyEnabledValue() const;
rpl::producer<ItemView> views() const;
@@ -149,7 +150,7 @@ private:
void updateView(const Item &item);
void applyChanges();
void saveDelayed();
void createChecker(Item &item);
void refreshChecker(Item &item);
void setupChecker(int id, const Checker &checker);
void replaceItemWith(
@@ -165,6 +166,7 @@ private:
std::vector<Item> _list;
rpl::event_stream<ItemView> _views;
base::Timer _saveTimer;
rpl::event_stream<bool> _proxyEnabledChanges;
ProxyData _lastSelectedProxy;
bool _lastSelectedProxyUsed = false;