summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-10-14 16:43:53 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-10-14 16:43:53 +0300
commit64b53b1c28ffa353ff2f0c0a01405f9afc2b7bf1 (patch)
tree09f966d418bd50c8d63b52ec7896462803dc6294 /plugins
parent29af90eb23768e9eb2c29091fefaaa10c78ff8cd (diff)
common group chat code moved to mir_app
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Scriver/src/msgdialog.cpp17
-rw-r--r--plugins/TabSRMM/src/chat_tools.cpp3
-rw-r--r--plugins/TabSRMM/src/msgdialog.cpp4
-rw-r--r--plugins/TabSRMM/src/msgdlgother.cpp5
4 files changed, 5 insertions, 24 deletions
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp
index 602aeaeb0e..2477dcbfa6 100644
--- a/plugins/Scriver/src/msgdialog.cpp
+++ b/plugins/Scriver/src/msgdialog.cpp
@@ -855,17 +855,7 @@ INT_PTR CMsgDialog::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
case DM_ACTIVATE:
if (isChat()) {
- if (m_si->wState & STATE_TALK) {
- m_si->wState &= ~STATE_TALK;
- db_unset(m_hContact, m_si->pszModule, "ApparentMode");
- }
-
- if (m_si->wState & GC_EVENT_HIGHLIGHT) {
- m_si->wState &= ~GC_EVENT_HIGHLIGHT;
-
- if (Clist_GetEvent(m_hContact, 0))
- Clist_RemoveEvent(m_hContact, GC_FAKE_EVENT);
- }
+ m_si->markRead();
FixTabIcons();
if (!m_si->pDlg) {
@@ -882,10 +872,7 @@ INT_PTR CMsgDialog::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
SetFocus(m_message.GetHwnd());
if (isChat()) {
- if (db_get_w(m_hContact, m_si->pszModule, "ApparentMode") != 0)
- db_unset(m_hContact, m_si->pszModule, "ApparentMode");
- if (Clist_GetEvent(m_hContact, 0))
- Clist_RemoveEvent(m_hContact, GC_FAKE_EVENT);
+ m_si->markRead(true);
}
else {
if (m_hDbUnreadEventFirst != 0) {
diff --git a/plugins/TabSRMM/src/chat_tools.cpp b/plugins/TabSRMM/src/chat_tools.cpp
index 31682a5f0e..166468ab11 100644
--- a/plugins/TabSRMM/src/chat_tools.cpp
+++ b/plugins/TabSRMM/src/chat_tools.cpp
@@ -40,8 +40,7 @@ static void __stdcall Chat_DismissPopup(void *pi)
{
SESSION_INFO *si = (SESSION_INFO*)pi;
if (si->hContact)
- if (Clist_GetEvent(si->hContact, 0))
- Clist_RemoveEvent(si->hContact, GC_FAKE_EVENT);
+ si->markRead(true);
if (si->pDlg && si->pDlg->timerFlash.Stop())
FlashWindow(si->pDlg->GetHwnd(), FALSE);
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp
index d158902e32..a0fdd09f57 100644
--- a/plugins/TabSRMM/src/msgdialog.cpp
+++ b/plugins/TabSRMM/src/msgdialog.cpp
@@ -681,9 +681,7 @@ void CMsgDialog::OnDestroy()
DestroyWindow(m_hwndPanelPicParent);
if (m_si) {
- if (Clist_GetEvent(m_si->hContact, 0))
- Clist_RemoveEvent(m_si->hContact, GC_FAKE_EVENT);
- m_si->wState &= ~STATE_TALK;
+ m_si->markRead(true);
m_si->pDlg = nullptr;
m_si = nullptr;
}
diff --git a/plugins/TabSRMM/src/msgdlgother.cpp b/plugins/TabSRMM/src/msgdlgother.cpp
index 982ab1cdcb..f9d345a4d8 100644
--- a/plugins/TabSRMM/src/msgdlgother.cpp
+++ b/plugins/TabSRMM/src/msgdlgother.cpp
@@ -2590,10 +2590,7 @@ void CMsgDialog::UpdateWindowState(UINT msg)
if (m_si) {
m_hTabIcon = m_hTabStatusIcon;
- if (db_get_w(m_si->hContact, m_si->pszModule, "ApparentMode") != 0)
- db_unset(m_si->hContact, m_si->pszModule, "ApparentMode");
- if (Clist_GetEvent(m_si->hContact, 0))
- Clist_RemoveEvent(m_si->hContact, GC_FAKE_EVENT);
+ m_si->markRead(true);
UpdateTitle();
m_hTabIcon = m_hTabStatusIcon;