summaryrefslogtreecommitdiff
path: root/plugins/Scriver/src/msgdialog.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2023-02-09 18:21:23 +0300
committerGeorge Hazan <ghazan@miranda.im>2023-02-09 18:22:12 +0300
commit5ef0585dbd3bfbc09093bc8f24f41e4ae2349c59 (patch)
treeb76db3dc8173189591d65cc9a1a4e181331ca8f8 /plugins/Scriver/src/msgdialog.cpp
parent6ef65121fed3c38c467238a08bf96bf98a23d7d8 (diff)
SRMM: better support for group chats in database
Diffstat (limited to 'plugins/Scriver/src/msgdialog.cpp')
-rw-r--r--plugins/Scriver/src/msgdialog.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp
index 3618b9a1aa..8f7a405723 100644
--- a/plugins/Scriver/src/msgdialog.cpp
+++ b/plugins/Scriver/src/msgdialog.cpp
@@ -236,20 +236,16 @@ bool CMsgDialog::OnInitDialog()
UpdateStatusBar();
UpdateTitle();
UpdateNickList();
+ UpdateChatLog();
m_pParent->AddChild(this);
PopupWindow(false);
-
- if (m_si->pMI->bDatabase) {
- FindFirstEvent();
- SendMessage(m_hwnd, DM_REMAKELOG, 0, 0);
- }
}
else {
m_nickList.Hide();
m_splitterX.Hide();
- bool notifyUnread = FindFirstEvent();
+ bool notifyUnread = GetFirstEvent();
m_pParent->AddChild(this);
@@ -1170,7 +1166,7 @@ INT_PTR CMsgDialog::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
break;
case HM_DBEVENTADDED:
- if (wParam == m_hContact) {
+ if (wParam == m_hContact && !isChat()) {
MEVENT hDbEvent = lParam;
DBEVENTINFO dbei = {};
db_event_get(hDbEvent, &dbei);
@@ -1194,7 +1190,7 @@ INT_PTR CMsgDialog::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
PopupWindow(true);
}
- if (isChat() || (hDbEvent != m_hDbEventFirst && db_event_next(m_hContact, hDbEvent) == 0))
+ if (hDbEvent != m_hDbEventFirst && db_event_next(m_hContact, hDbEvent) == 0)
m_pLog->LogEvents(hDbEvent, 1, 1);
else
SendMessage(m_hwnd, DM_REMAKELOG, 0, 0);