mu: calculate thread subjects

Calculate the thread subject, that is, the subject of the (sub)thread _or_
empty if it's the same as the previous subject.

This is for the UI feature of _not_ showing the subject when it's just
repeating from the previous.
This commit is contained in:
Dirk-Jan C. Binnema
2021-05-04 17:34:47 +03:00
parent 6d67e146fe
commit 473d3998ce
3 changed files with 28 additions and 17 deletions

View File

@ -91,11 +91,10 @@ struct QueryMatch {
// (ignoring prefixes such as Re:)
//
// otherwise, it is empty.
std::string subject;
std::string thread_subject; /**< the thread subject for this message */
std::string subject; /**< subject for this message */
size_t thread_level{}; /**< The thread level */
std::string thread_path; /**< The hex-numerial path in the thread, ie. '00:01:0a' */
std::string thread_date{}; /**< date of newest message in thread */
std::string thread_date; /**< date of newest message in thread */
bool operator<(const QueryMatch& rhs) const {
return date_key < rhs.date_key;