diff options
author | George Hazan <george.hazan@gmail.com> | 2023-12-22 17:55:36 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-12-22 17:55:36 +0300 |
commit | af546e2f55ccb9a270ce4967d1942aebfcbbea19 (patch) | |
tree | fc15b7c1616f190637989534918687cf17403274 /plugins | |
parent | 7f2ed0ff4588043500b739e151c4db73e5e2968e (diff) |
DB::EventInfo::wipeNotify - useful helper to hide blinking event both from database & contact list
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/IEView/src/HTMLBuilder.cpp | 6 | ||||
-rw-r--r-- | plugins/NewStory/src/history_array.cpp | 7 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msglog.cpp | 7 |
3 files changed, 6 insertions, 14 deletions
diff --git a/plugins/IEView/src/HTMLBuilder.cpp b/plugins/IEView/src/HTMLBuilder.cpp index 6a0f3a1d43..3c251572c4 100644 --- a/plugins/IEView/src/HTMLBuilder.cpp +++ b/plugins/IEView/src/HTMLBuilder.cpp @@ -204,10 +204,8 @@ void HTMLBuilder::appendEventOld(IEView *view, IEVIEWEVENT *event) continue;
}
- if (!(dbei.flags & DBEF_SENT) && dbei.eventType == EVENTTYPE_MESSAGE) {
- db_event_markRead(event->hContact, hDbEvent);
- Clist_RemoveEvent(-1, hDbEvent);
- }
+ if (dbei.eventType == EVENTTYPE_MESSAGE || dbei.eventType == EVENTTYPE_FILE)
+ dbei.wipeNotify(hDbEvent);
if (!isDbEventShown(dbei)) {
hDbEvent = db_event_next(event->hContact, hDbEvent);
diff --git a/plugins/NewStory/src/history_array.cpp b/plugins/NewStory/src/history_array.cpp index 3050e5af52..8ffa8c3106 100644 --- a/plugins/NewStory/src/history_array.cpp +++ b/plugins/NewStory/src/history_array.cpp @@ -469,11 +469,8 @@ void ItemData::load(int flags) void ItemData::markRead() { - if (!(dbe.flags & DBEF_SENT)) { - if (!dbe.markedRead()) - db_event_markRead(hContact, hEvent); - Clist_RemoveEvent(-1, hEvent); - } + if (!(dbe.flags & DBEF_SENT)) + dbe.wipeNotify(hEvent); } void ItemData::setText(HWND hwnd) diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp index 352063b2dd..2ae3bd5186 100644 --- a/plugins/TabSRMM/src/msglog.cpp +++ b/plugins/TabSRMM/src/msglog.cpp @@ -570,11 +570,8 @@ bool CLogWindow::CreateRtfEvent(RtfLogStreamData *streamData, DB::EventInfo &dbe BOOL isSent = (dbei.flags & DBEF_SENT);
BOOL bIsStatusChangeEvent = IsStatusEvent(dbei.eventType);
- if (!isSent && bIsStatusChangeEvent) {
- if (!dbei.markedRead())
- db_event_markRead(streamData->hContact, streamData->hDbEvent);
- Clist_RemoveEvent(-1, streamData->hDbEvent);
- }
+ if (!isSent && bIsStatusChangeEvent)
+ dbei.wipeNotify(streamData->hDbEvent);
CMStringW msg(ptrW(DbEvent_GetTextW(&dbei, CP_UTF8)));
if (msg.IsEmpty())
|