diff options
author | George Hazan <ghazan@miranda.im> | 2023-04-18 22:21:47 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2023-04-18 22:21:47 +0300 |
commit | e0d5440d5cd44ba757b9496ecbe71de53cdb1a2f (patch) | |
tree | 6b782d0f2fbef55b3e0370be4cb39ea544ef542a | |
parent | f7155b684cb4d1db8075d632c645742dfa91693c (diff) |
prevents tabSRMM from opening unread channels on startup
-rw-r--r-- | plugins/TabSRMM/src/globals.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp index 997bd3780c..76797f910f 100644 --- a/plugins/TabSRMM/src/globals.cpp +++ b/plugins/TabSRMM/src/globals.cpp @@ -439,18 +439,20 @@ void CGlobals::RestoreUnreadMessageAlerts(void) if (db_get_dw(hContact, "SendLater", "count", 0))
SendLater::addContact(hContact);
- for (MEVENT hDbEvent = db_event_firstUnread(hContact); hDbEvent; hDbEvent = db_event_next(hContact, hDbEvent)) {
- DBEVENTINFO dbei = {};
- if (db_event_get(hDbEvent, &dbei))
- continue;
- if (Proto_GetBaseAccountName(hContact) == nullptr)
- continue;
-
- if (!dbei.markedRead() && dbei.eventType == EVENTTYPE_MESSAGE) {
- if (Srmm_FindWindow(hContact) != nullptr)
+ if (!Contact::IsGroupChat(hContact)) {
+ for (MEVENT hDbEvent = db_event_firstUnread(hContact); hDbEvent; hDbEvent = db_event_next(hContact, hDbEvent)) {
+ DBEVENTINFO dbei = {};
+ if (db_event_get(hDbEvent, &dbei))
continue;
+ if (Proto_GetBaseAccountName(hContact) == nullptr)
+ continue;
+
+ if (!dbei.markedRead() && dbei.eventType == EVENTTYPE_MESSAGE) {
+ if (Srmm_FindWindow(hContact) != nullptr)
+ continue;
- arEvents.insert(new MSavedEvent(hContact, hDbEvent));
+ arEvents.insert(new MSavedEvent(hContact, hDbEvent));
+ }
}
}
}
|