diff options
author | dtk <dtk@gmx.de> | 2012-01-03 00:20:49 +0100 |
---|---|---|
committer | dtk <dtk@gmx.de> | 2012-01-03 20:00:56 +0100 |
commit | 3f9b58d4c27549150dfd86f5cc2a4461d89ff5c3 (patch) | |
tree | 687cd9d27c9cb9665fab883564da2cb78ea9b749 /alot | |
parent | 7fe9f5fdf3981824e1260665fec82423f275074b (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.py | 3 |
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 |