2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Support multiple proxies in local storage.

This commit is contained in:
John Preston
2018-04-27 21:26:45 +04:00
parent 8e99135f37
commit 900d1ddb36
12 changed files with 205 additions and 146 deletions

View File

@@ -99,8 +99,7 @@ void ConnectingWidget::paintEvent(QPaintEvent *e) {
}
void ConnectingWidget::onReconnect() {
auto throughProxy = (Global::ConnectionType() != dbictAuto);
if (throughProxy) {
if (Global::UseProxy()) {
Ui::show(Box<ConnectionBox>());
} else {
MTP::restart();
@@ -409,7 +408,7 @@ void MainWindow::mtpStateChanged(int32 dc, int32 state) {
void MainWindow::updateConnectingStatus() {
auto state = MTP::dcstate();
auto throughProxy = (Global::ConnectionType() != dbictAuto);
const auto throughProxy = Global::UseProxy();
if (state == MTP::ConnectingState || state == MTP::DisconnectedState || (state < 0 && state > -600)) {
if (_main || getms() > 5000 || _connecting) {
showConnecting(lang(throughProxy ? lng_connecting_to_proxy : lng_connecting), throughProxy ? lang(lng_connecting_settings) : QString());