diff options
author | George Hazan <george.hazan@gmail.com> | 2023-06-19 12:57:29 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-06-19 12:57:29 +0300 |
commit | 185ebd42c6f6364a615d8fe09d060c713ec10b46 (patch) | |
tree | 6d489fb61d3fd43f7ce7f6baad5a89661af0136b /src/mir_app | |
parent | e503f800768d5d794ca033a89f92e5b21d7eeee3 (diff) |
useless helper removed
Diffstat (limited to 'src/mir_app')
-rw-r--r-- | src/mir_app/src/chat_manager.cpp | 7 | ||||
-rw-r--r-- | src/mir_app/src/srmm_base.cpp | 7 |
2 files changed, 3 insertions, 11 deletions
diff --git a/src/mir_app/src/chat_manager.cpp b/src/mir_app/src/chat_manager.cpp index ea74717a14..f8ceb299cf 100644 --- a/src/mir_app/src/chat_manager.cpp +++ b/src/mir_app/src/chat_manager.cpp @@ -257,12 +257,6 @@ BOOL SM_RemoveUser(SESSION_INFO *si, const wchar_t *pszUID) return TRUE;
}
-static USERINFO* SM_GetUserFromIndex(const wchar_t *pszID, const char *pszModule, int index)
-{
- SESSION_INFO *si = Chat_Find(pszID, pszModule);
- return (si == nullptr) ? nullptr : UM_FindUserFromIndex(si, index);
-}
-
BOOL SM_GiveStatus(SESSION_INFO *si, const wchar_t *pszUID, const wchar_t *pszStatus)
{
if (si == nullptr)
@@ -787,7 +781,6 @@ static void ResetApi() g_chatApi.SM_GetStatusIcon = ::SM_GetStatusIcon;
g_chatApi.SM_GetCount = ::SM_GetCount;
g_chatApi.SM_FindSessionByIndex = ::SM_FindSessionByIndex;
- g_chatApi.SM_GetUserFromIndex = ::SM_GetUserFromIndex;
g_chatApi.SM_InvalidateLogDirectories = ::SM_InvalidateLogDirectories;
g_chatApi.MM_CreateModule = ::MM_CreateModule;
diff --git a/src/mir_app/src/srmm_base.cpp b/src/mir_app/src/srmm_base.cpp index 6612572732..99eea7065d 100644 --- a/src/mir_app/src/srmm_base.cpp +++ b/src/mir_app/src/srmm_base.cpp @@ -282,7 +282,7 @@ static void ProcessNickListHovering(HWND hwnd, int hoveredItem, SESSION_INFO *pa CMStringW wszBuf;
- USERINFO *ui1 = g_chatApi.SM_GetUserFromIndex(parentdat->ptszID, parentdat->pszModule, currentHovered);
+ USERINFO *ui1 = g_chatApi.UM_FindUserFromIndex(parentdat, currentHovered);
if (ui1) {
if (ProtoServiceExists(parentdat->pszModule, MS_GC_PROTO_GETTOOLTIPTEXT)) {
wchar_t *p = (wchar_t*)CallProtoService(parentdat->pszModule, MS_GC_PROTO_GETTOOLTIPTEXT, (WPARAM)parentdat->ptszID, (LPARAM)ui1->pszUID);
@@ -323,7 +323,7 @@ static void CALLBACK ChatTimerProc(HWND hwnd, UINT, UINT_PTR idEvent, DWORD) return;
}
- USERINFO *ui1 = g_chatApi.SM_GetUserFromIndex(si->ptszID, si->pszModule, si->currentHovered);
+ USERINFO *ui1 = g_chatApi.UM_FindUserFromIndex(si, si->currentHovered);
if (ui1) {
CMStringW wszBuf;
if (ProtoServiceExists(si->pszModule, MS_GC_PROTO_GETTOOLTIPTEXT)) {
@@ -466,8 +466,7 @@ LRESULT CSrmmBaseDialog::WndProc_Nicklist(UINT msg, WPARAM wParam, LPARAM lParam if (HIWORD(item) != 0) // clicked outside the client area
break;
- USERINFO *ui = g_chatApi.SM_GetUserFromIndex(m_si->ptszID, m_si->pszModule, item);
- if (ui != nullptr) {
+ if (USERINFO *ui = g_chatApi.UM_FindUserFromIndex(m_si, item)) {
if (pt.x == -1 && pt.y == -1)
pt.y += height - 4;
ClientToScreen(m_nickList.GetHwnd(), &pt);
|