diff options
author | George Hazan <george.hazan@gmail.com> | 2024-07-12 16:25:57 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-07-12 16:25:57 +0300 |
commit | e08143e37cff1be034540d89028b9dba6f0cef70 (patch) | |
tree | 1196deaa1a2f15ca83531c612128da286d6bce10 /src | |
parent | 1f5c34c5678de36df653da048662008bfe6e1af2 (diff) |
fixes #4530 (Weaher: недоступна кнопка "Обновить" в информации о пользователе)
Diffstat (limited to 'src')
-rw-r--r-- | src/core/stduserinfo/src/userinfo.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/proto_internal.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/protocols.cpp | 9 |
3 files changed, 9 insertions, 4 deletions
diff --git a/src/core/stduserinfo/src/userinfo.cpp b/src/core/stduserinfo/src/userinfo.cpp index fc3d37bab5..1a6d7a150f 100644 --- a/src/core/stduserinfo/src/userinfo.cpp +++ b/src/core/stduserinfo/src/userinfo.cpp @@ -317,7 +317,7 @@ public: CheckOnline();
if (!CallContactService(m_hContact, PS_GETINFO, SGIF_ONOPEN)) {
btnUpdate.Disable();
- SetTimer(m_hwnd, 1, 100, nullptr);
+ updateTimer.Start(100);
}
else ShowWindow(GetDlgItem(m_hwnd, IDC_UPDATING), SW_HIDE);
diff --git a/src/mir_app/src/proto_internal.cpp b/src/mir_app/src/proto_internal.cpp index dd1225a5d2..d10b3262c2 100644 --- a/src/mir_app/src/proto_internal.cpp +++ b/src/mir_app/src/proto_internal.cpp @@ -217,7 +217,7 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE int GetStatus() override
{
- return (int)ProtoCallService(m_szModuleName, PS_SETSTATUS, 0, 0);
+ return (int)ProtoCallService(m_szModuleName, PS_GETSTATUS, 0, 0);
}
int SetStatus(int iNewStatus) override
diff --git a/src/mir_app/src/protocols.cpp b/src/mir_app/src/protocols.cpp index 568ee41e5d..9acb77dada 100644 --- a/src/mir_app/src/protocols.cpp +++ b/src/mir_app/src/protocols.cpp @@ -295,8 +295,13 @@ MIR_APP_DLL(int) Proto_GetStatus(const char *accName) if (accName == nullptr)
return ID_STATUS_OFFLINE;
- PROTOACCOUNT *pa = g_arAccounts.find((PROTOACCOUNT*)&accName);
- return (pa) ? pa->iRealStatus : ID_STATUS_OFFLINE;
+ if (auto *pa = g_arAccounts.find((PROTOACCOUNT *)&accName)) {
+ if (pa->bOldProto)
+ return ProtoCallService(pa->szModuleName, PS_GETSTATUS, 0, 0);
+ return pa->iRealStatus;
+ }
+
+ return ID_STATUS_OFFLINE;
}
/////////////////////////////////////////////////////////////////////////////////////////
|