diff options
author | George Hazan <george.hazan@gmail.com> | 2023-12-20 13:54:23 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-12-20 13:54:23 +0300 |
commit | 2719227fa5d6146ad5573416774f056f7daf519a (patch) | |
tree | be11496b71f935731577fc631192c3e9a1dc2f50 /plugins/NewStory/src | |
parent | e96132b4d5344d2d58d247906bcaefccfb9d5253 (diff) |
minus one more potential source of hangup
Diffstat (limited to 'plugins/NewStory/src')
-rw-r--r-- | plugins/NewStory/src/history_array.cpp | 3 | ||||
-rw-r--r-- | plugins/NewStory/src/history_control.cpp | 13 |
2 files changed, 13 insertions, 3 deletions
diff --git a/plugins/NewStory/src/history_array.cpp b/plugins/NewStory/src/history_array.cpp index 9bc64a2f81..809035274e 100644 --- a/plugins/NewStory/src/history_array.cpp +++ b/plugins/NewStory/src/history_array.cpp @@ -408,7 +408,8 @@ void ItemData::load(int flags) buf.AppendFormat(TranslateT(" %u KB"), size < 1024 ? 1 : unsigned(blob.getSize() / 1024)); wtext = buf.Detach(); - markRead(); + if (!(flags & LOAD_BACK)) + markRead(); break; } diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp index b2b83ebc44..441eda90fd 100644 --- a/plugins/NewStory/src/history_control.cpp +++ b/plugins/NewStory/src/history_control.cpp @@ -121,8 +121,17 @@ static void __cdecl sttLoadItems(void *param) auto *pData = (NewstoryListData *)param; for (int i = pData->totalCount-1; i >= 0; i--) { auto *pItem = pData->LoadItem(i, true); - if (pItem->dbe.eventType == EVENTTYPE_MESSAGE && !(pItem->dbe.flags & DBEF_SENT) && !pItem->dbe.markedRead()) - PostMessage(pData->m_hwnd, UM_MARKREAD, WPARAM(pItem), 0); + switch (pItem->dbe.eventType) { + case EVENTTYPE_FILE: + if (!pItem->m_bOfflineFile) + break; + __fallthrough; + + case EVENTTYPE_MESSAGE: + if (!(pItem->dbe.flags & DBEF_SENT) && !pItem->dbe.markedRead()) + PostMessage(pData->m_hwnd, UM_MARKREAD, WPARAM(pItem), 0); + break; + } if ((i % 100) == 0) Sleep(50); |