summaryrefslogtreecommitdiff
path: root/alot
diff options
context:
space:
mode:
authordtk <dtk@gmx.de>2012-01-03 00:20:49 +0100
committerdtk <dtk@gmx.de>2012-01-03 20:00:56 +0100
commit3f9b58d4c27549150dfd86f5cc2a4461d89ff5c3 (patch)
tree687cd9d27c9cb9665fab883564da2cb78ea9b749 /alot
parent7fe9f5fdf3981824e1260665fec82423f275074b (diff)
[PoC] Highlight threads upon arbitrary queries
This commit is a quick n dirty proof of concept that shows how themeing according to arbitrary notmuch queries might be implemented.
Diffstat (limited to 'alot')
-rw-r--r--alot/widgets.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/alot/widgets.py b/alot/widgets.py
index 9a024afa..b11267be 100644
--- a/alot/widgets.py
+++ b/alot/widgets.py
@@ -193,7 +193,8 @@ class ThreadlineWidget(urwid.AttrMap):
def _get_highlight_theme_suffix(self):
suffix = None
for tags in self.highlight_tags:
- if self.thread.has_tags(*tags):
+ query = 'thread:{} AND tag:{}'.format(self.thread.get_thread_id(), ' AND tag:'.join(tags))
+ if self.dbman.count_messages(query):
suffix = '+'.join(tags)
break
return suffix