summaryrefslogtreecommitdiffstats
path: root/test5.hs
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2014-12-31 13:29:06 +0100
committertv <tv@shackspace.de>2014-12-31 13:29:06 +0100
commit10db15e75804b8af6878cb3b850ffde75f38d1a0 (patch)
tree763b8261078bf3cb7f2d1c87212cef05dcc6e18b /test5.hs
parent3b7e06df9ac0856ddeb52434867a3fdb44d86b3a (diff)
moveCursorToUnread: use hasTag instead of isUnread
Diffstat (limited to 'test5.hs')
-rw-r--r--test5.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/test5.hs b/test5.hs
index 9b6755d..3d62872 100644
--- a/test5.hs
+++ b/test5.hs
@@ -355,15 +355,15 @@ moveCursorToUnread cursorMove getTreeMoveCount treeMove q@State{..} =
return q { flashMessage = "no unread message in sight" }
where
rec loc =
- if isUnread loc
+ if hasTag "unread" loc
then Just loc
else cursorMove loc >>= rec
- isUnread loc =
+ hasTag tag loc =
case Z.label loc of
TVSearchResult sr ->
- "unread" `elem` Notmuch.searchTags sr
+ tag `elem` Notmuch.searchTags sr
TVMessage m ->
- "unread" `elem` Notmuch.messageTags m
+ tag `elem` Notmuch.messageTags m
_ ->
False