diff options
author | George Hazan <george.hazan@gmail.com> | 2024-09-06 15:19:13 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-09-06 15:19:13 +0300 |
commit | 88aa2752d994043599f9662b9fa2b629f07058c2 (patch) | |
tree | cf5416b4267f2b2298e2c0afde24dd269a396320 /protocols/Telegram/src/options.cpp | |
parent | 239ea74ddedb7d3483d08cd599647edcbe4ab9c4 (diff) |
fixes #4618 (Telegram: после успешного логина нужно засерять поля логина и пароля в настройках)
Diffstat (limited to 'protocols/Telegram/src/options.cpp')
-rw-r--r-- | protocols/Telegram/src/options.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/protocols/Telegram/src/options.cpp b/protocols/Telegram/src/options.cpp index bee31419c1..8b3bd7d1e7 100644 --- a/protocols/Telegram/src/options.cpp +++ b/protocols/Telegram/src/options.cpp @@ -52,7 +52,6 @@ public: CreateLink(chkCompressFiles, ppro->m_bCompressFiles);
}
- btnLogout.Enable(m_proto->getByte(DBKEY_AUTHORIZED));
btnLogout.OnClick = Callback(this, &COptionsDlg::onClick_Logout);
cmbCountry.OnChange = Callback(this, &COptionsDlg::onChange_Country);
@@ -71,6 +70,11 @@ public: cmbCountry.SetCurSel(idx);
}
+ bool bAuthorized = m_proto->getBool(DBKEY_AUTHORIZED);
+ btnLogout.Enable(bAuthorized);
+ edtPhone.Enable(!bAuthorized);
+ cmbCountry.Enable(!bAuthorized);
+
onChange_Country(0);
return true;
}
@@ -93,6 +97,9 @@ public: void onClick_Logout(CCtrlButton *)
{
m_proto->UnregisterSession();
+
+ edtPhone.Enable();
+ cmbCountry.Enable();
}
void onChange_Country(CCtrlCombo *)
|