diff options
author | Kierán Meinhardt <kieran.meinhardt@gmail.com> | 2020-09-22 23:40:00 +0200 |
---|---|---|
committer | Kierán Meinhardt <kieran.meinhardt@gmail.com> | 2020-09-23 00:10:07 +0200 |
commit | ca8439b6787eb238d7b07544dfc728488f3c71b6 (patch) | |
tree | 0f812affaa5c569248ee2c1c7e8b39c6e8a405c7 /TreeView.hs | |
parent | 121d703bcd3ecbaba031499070907251b5eae1a9 (diff) |
lint
Diffstat (limited to 'TreeView.hs')
-rw-r--r-- | TreeView.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/TreeView.hs b/TreeView.hs index 3cb8174..ecd25c8 100644 --- a/TreeView.hs +++ b/TreeView.hs @@ -93,7 +93,7 @@ xconvPart m p = where contents = case partContent p of ContentText t -> - map (xconvLine m p) $ zip [0..] (T.lines t) + zipWith (curry $ xconvLine m p) [0..] (T.lines t) ContentMultipart parts -> map (xconvPart m) parts ContentMsgRFC822 _ -> @@ -145,14 +145,14 @@ loadSubForest = \case . subForest $ xconvPart m mp' - TVSearchResult sr -> do + TVSearchResult sr -> Right . unloadPartsWithFilename . map unloadReadSubForests . fromMessageForest <$> notmuchShow (termFromSearchResult sr) - TVSearch s -> do + TVSearch s -> Right . subForest . fromSearchResults s @@ -180,9 +180,9 @@ unloadSubForest t = case rootLabel t of hasUnloadedSubForest :: Tree TreeView -> Bool hasUnloadedSubForest t = case rootLabel t of TVMessage _ -> - null $ filter (not . isTVMessage . rootLabel) $ subForest t + all (isTVMessage . rootLabel) $ subForest t TVMessagePart _ _ -> - null $ filter (not . isTVMessagePart . rootLabel) $ subForest t + all (isTVMessagePart . rootLabel) $ subForest t _ -> null $ subForest t |