From 10db15e75804b8af6878cb3b850ffde75f38d1a0 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 31 Dec 2014 13:29:06 +0100 Subject: moveCursorToUnread: use hasTag instead of isUnread --- test5.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test5.hs') 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 -- cgit v1.2.3