summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/Main.hs8
1 files changed, 7 insertions, 1 deletions
diff --git a/main/Main.hs b/main/Main.hs
index 8d7cc08..4b09d3d 100644
--- a/main/Main.hs
+++ b/main/Main.hs
@@ -385,7 +385,9 @@ interactiveLoop st opts = withTerminal commandCompletion $ \term -> do
Right prompt -> return prompt
lift $ setPrompt term $ plainText $ T.pack prompt
join $ lift $ getInputLine term $ \case
- Just input@('/' : _) -> KeepPrompt $ return input
+ Just input@('/' : _)
+ | "/seen" : _ <- words input -> ErasePrompt $ return input
+ | otherwise -> KeepPrompt $ return input
Just input -> ErasePrompt $ case reverse input of
_ | all isSpace input -> getInputLinesTui eprompt
'\\':rest -> (reverse ('\n':rest) ++) <$> getInputLinesTui (Right ">> ")
@@ -711,6 +713,7 @@ commands =
, ( "invite-accept", cmdInviteAccept )
, ( "conversations", cmdConversations )
, ( "new", cmdNew )
+ , ( "seen", cmdSeen )
, ( "details", cmdDetails )
, ( "discovery", cmdDiscovery )
, ( "join", cmdJoin )
@@ -1113,6 +1116,9 @@ cmdNew = do
= Just ( conv, msg )
checkNew _ = Nothing
+cmdSeen :: Command
+cmdSeen = markAllSeen =<< getSelectedConversation
+
cmdDetails :: Command
cmdDetails = do