summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-09-12 20:24:50 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-09-12 20:24:50 +0300
commit17a1501868e8807f4551c645af6252830874021a (patch)
tree4565e50bb345325f875742e14bec9e751cb8be05
parent9dedc6fb280a58f83d7939ab0b85c00ea0d726f1 (diff)
NewStory: to always display from/to nick for the search results
-rw-r--r--plugins/NewStory/src/history_array.cpp1
-rw-r--r--plugins/NewStory/src/history_array.h2
-rw-r--r--plugins/NewStory/src/templates.cpp2
3 files changed, 3 insertions, 2 deletions
diff --git a/plugins/NewStory/src/history_array.cpp b/plugins/NewStory/src/history_array.cpp
index 18730fba87..48656c1f56 100644
--- a/plugins/NewStory/src/history_array.cpp
+++ b/plugins/NewStory/src/history_array.cpp
@@ -474,6 +474,7 @@ void HistoryArray::addResults(const OBJLIST<SearchResult> &pArray)
auto &p = allocateItem();
p.hContact = it->hContact;
p.hEvent = it->hEvent;
+ p.m_bIsResult = true;
pPrev = p.checkPrev(pPrev);
}
}
diff --git a/plugins/NewStory/src/history_array.h b/plugins/NewStory/src/history_array.h
index bc1f15f19f..00a8b9ae0d 100644
--- a/plugins/NewStory/src/history_array.h
+++ b/plugins/NewStory/src/history_array.h
@@ -15,7 +15,7 @@ struct ItemData
bool m_bRtf;
bool m_bSelected, m_bHighlighted;
- bool m_bLoaded;
+ bool m_bLoaded, m_bIsResult;
bool m_bOfflineFile, m_bOfflineDownloaded;
uint8_t m_grouping;
diff --git a/plugins/NewStory/src/templates.cpp b/plugins/NewStory/src/templates.cpp
index 7773f8af16..28bf16757a 100644
--- a/plugins/NewStory/src/templates.cpp
+++ b/plugins/NewStory/src/templates.cpp
@@ -230,7 +230,7 @@ void vfEvent(TemplateVars *vars, MCONTACT, ItemData *item)
wchar_t buf[100];
// %N: Nickname
- if (item->dbe.flags & DBEF_SENT) {
+ if (!item->m_bIsResult && (item->dbe.flags & DBEF_SENT)) {
if (!item->wszNick) {
char *proto = Proto_GetBaseAccountName(item->hContact);
ptrW nick(Contact::GetInfo(CNF_DISPLAY, 0, proto));