diff options
author | George Hazan <ghazan@miranda.im> | 2023-02-09 18:21:23 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2023-02-09 18:22:12 +0300 |
commit | 5ef0585dbd3bfbc09093bc8f24f41e4ae2349c59 (patch) | |
tree | b76db3dc8173189591d65cc9a1a4e181331ca8f8 /plugins/Scriver/src/msgdialog.cpp | |
parent | 6ef65121fed3c38c467238a08bf96bf98a23d7d8 (diff) |
SRMM: better support for group chats in database
Diffstat (limited to 'plugins/Scriver/src/msgdialog.cpp')
-rw-r--r-- | plugins/Scriver/src/msgdialog.cpp | 12 |
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);
|