cli: option to mark shown messages as read (off by default) (#3506)

* cli: option to mark shown messages as read (off by default)

* fix tests

* fix tests
This commit is contained in:
Evgeny Poberezkin
2023-12-03 15:42:26 +00:00
committed by GitHub
parent f94c0311c1
commit 6a9a67db14
7 changed files with 28 additions and 17 deletions
+2 -1
View File
@@ -82,6 +82,7 @@ testOpts =
allowInstantFiles = True,
autoAcceptFileSize = 0,
muteNotifications = True,
markRead = True,
maintenance = False
}
@@ -174,7 +175,7 @@ startTestChat_ db cfg opts user = do
t <- withVirtualTerminal termSettings pure
ct <- newChatTerminal t opts
cc <- newChatController db (Just user) cfg opts
chatAsync <- async . runSimplexChat opts user cc . const $ runChatTerminal ct
chatAsync <- async . runSimplexChat opts user cc $ \_u cc' -> runChatTerminal ct cc' opts
atomically . unless (maintenance opts) $ readTVar (agentAsync cc) >>= \a -> when (isNothing a) retry
termQ <- newTQueueIO
termAsync <- async $ readTerminalOutput t termQ