summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKierán Meinhardt <kieran.meinhardt@gmail.com>2020-09-30 17:08:59 +0200
committerKierán Meinhardt <kieran.meinhardt@gmail.com>2020-09-30 17:08:59 +0200
commiteff6fdb05bd33f6842034f68e8cb4b83503fd5f3 (patch)
treedec70c75795715cfbc2e499586e0b66f674e9e91
parentb59a8dc851bc06b64c166ad429238c05278fe56a (diff)
kmein config: simplify flashMessages
-rw-r--r--config/kmein.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/config/kmein.hs b/config/kmein.hs
index 397f1c8..f6f0f04 100644
--- a/config/kmein.hs
+++ b/config/kmein.hs
@@ -85,13 +85,13 @@ saveAttachment q
destination
| Just partFileName <- Notmuch.partContentFilename part = attachmentDestination </> T.unpack partFileName
| otherwise = concat ["much_", formatTime defaultTimeLocale "%s" (Notmuch.messageTime message), "_", show (Notmuch.partID part)]
- q' = q { flashMessage = SGR [1] (Plain destination) <> Plain " saved." }
+ q' = q { flashMessage = SGR [1] (Plain destination) <> Plain " saved" }
in case Notmuch.partContent part' of
Notmuch.ContentText text -> (Just destination, q') <$ T.writeFile destination text
Notmuch.ContentRaw raw _ -> (Just destination, q') <$ LBS8.writeFile destination raw
- _ -> return (Nothing, q { flashMessage = SGR [38,5,9] $ Plain "This part cannot be saved." })
- Left err -> return (Nothing, q { flashMessage = SGR [38,5,9] $ Plain err })
- | otherwise = return (Nothing, q { flashMessage = SGR [38,5,9] $ Plain "Cursor not on attachment." })
+ _ -> return (Nothing, q { flashMessage = "this part cannot be saved" })
+ Left err -> return (Nothing, q { flashMessage = Plain err })
+ | otherwise = return (Nothing, q { flashMessage = "cursor not on attachment" })
reply :: State -> IO State