diff options
Diffstat (limited to 'src/threadlistmodel.cpp')
| -rw-r--r-- | src/threadlistmodel.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/threadlistmodel.cpp b/src/threadlistmodel.cpp index 4794d8c..c675488 100644 --- a/src/threadlistmodel.cpp +++ b/src/threadlistmodel.cpp @@ -325,6 +325,24 @@ ThreadSummary ThreadListModel::threadAt(int row) const return m_threads.at(row); } +QStringList ThreadListModel::accountKeysForThread(const QString &threadId) const +{ + QStringList keys; + for (const ThreadSummary &thread : m_threads) { + if (thread.threadId != threadId) + continue; + for (const QString &tag : thread.tags) { + if (!TagColors::isAccountTag(tag)) + continue; + const QString key = TagColors::accountKeyForTag(tag); + if (!key.isEmpty() && !keys.contains(key)) + keys.append(key); + } + break; + } + return keys; +} + void ThreadListModel::applyTagChange(const QString &threadId, const QStringList &added, const QStringList &removed) |
