From 98dadb56353e198ea6da9ce4b80d724180b0208c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 6 May 2024 17:17:00 +0300 Subject: fixes #4390 completely --- protocols/Discord/src/options.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'protocols/Discord/src') diff --git a/protocols/Discord/src/options.cpp b/protocols/Discord/src/options.cpp index dc1c6eafa8..b11f0883f9 100644 --- a/protocols/Discord/src/options.cpp +++ b/protocols/Discord/src/options.cpp @@ -55,14 +55,13 @@ public: bool OnInitDialog() override { - if (mir_strlen(m_proto->m_szAccessToken)) { + if (m_proto->getMStringA(DB_KEY_TOKEN).IsEmpty()) + btnLogout.Disable(); + else { m_edUserName.Disable(); m_edPassword.Disable(); } - if (m_proto->getMStringA(DB_KEY_TOKEN).IsEmpty()) - btnLogout.Disable(); - ptrW buf(m_proto->getWStringA(DB_KEY_PASSWORD)); if (buf) m_edPassword.SetText(buf); -- cgit v1.2.3