summaryrefslogtreecommitdiffstats
path: root/test5.hs
diff options
context:
space:
mode:
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