diff options
author | George Hazan <george.hazan@gmail.com> | 2024-04-28 12:47:07 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-04-28 13:07:39 +0300 |
commit | bc2c5a5e28cfdaad52cf554606489757d0e23347 (patch) | |
tree | 420777488b9f45593cf9fdff7af88e2b500b2531 /plugins | |
parent | 9ab052d0edafb2c9a5f4a532efa94e5b305552c0 (diff) |
code cleaning
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/TabSRMM/src/mim.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp index 47f3245816..285bb8059c 100644 --- a/plugins/TabSRMM/src/mim.cpp +++ b/plugins/TabSRMM/src/mim.cpp @@ -374,11 +374,6 @@ int CMimAPI::MessageEventAdded(WPARAM hContact, LPARAM hDbEvent) return 0;
DB::EventInfo dbei(hDbEvent);
-
- auto *pDlg = Srmm_FindDialog(hContact);
- if (pDlg == nullptr)
- pDlg = Srmm_FindDialog(db_event_getContact(hDbEvent));
-
BOOL isCustomEvent = IsCustomEvent(dbei.eventType);
bool isShownCustomEvent = dbei.isSrmm();
if (dbei.markedRead() || (isCustomEvent && !isShownCustomEvent))
@@ -388,6 +383,9 @@ int CMimAPI::MessageEventAdded(WPARAM hContact, LPARAM hDbEvent) bool bAutoCreate = g_plugin.bAutoTabs;
bool bAutoContainer = g_plugin.bAutoContainer;
+ auto *pDlg = Srmm_FindDialog(hContact);
+ if (pDlg == nullptr && hContact != dbei.hContact)
+ pDlg = Srmm_FindDialog(dbei.hContact);
if (pDlg) {
TContainerData *pTargetContainer = pDlg->m_pContainer;
if (pTargetContainer == nullptr || !g_plugin.bHideOnClose || IsWindowVisible(pTargetContainer->m_hwnd))
|