mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-10-15 04:30:38 +00:00
core: option to limit the max number of loaded chats (#7499)
* core: option to limit the max number of loaded chats * update bot api --------- Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
This commit is contained in:
co-authored by
Evgeny @ SimpleX Chat
parent
be673038ab
commit
ca114a7a2a
@@ -67,6 +67,7 @@ data CoreChatOpts = CoreChatOpts
|
||||
logAgent :: Maybe LogLevel,
|
||||
logFile :: Maybe FilePath,
|
||||
tbqSize :: Natural,
|
||||
maxChats :: Int,
|
||||
deviceName :: Maybe Text,
|
||||
chatRelay :: Bool,
|
||||
webPreviewConfig :: Maybe WebPreviewConfig,
|
||||
@@ -234,6 +235,15 @@ coreChatOptsP appDir defaultDbName = do
|
||||
<> value 1024
|
||||
<> showDefault
|
||||
)
|
||||
maxChats <-
|
||||
option
|
||||
auto
|
||||
( long "max-chats"
|
||||
<> metavar "COUNT"
|
||||
<> help "Max number of chats loaded by chat list API"
|
||||
<> value 5000
|
||||
<> showDefault
|
||||
)
|
||||
deviceName <-
|
||||
optional $
|
||||
strOption
|
||||
@@ -340,6 +350,7 @@ coreChatOptsP appDir defaultDbName = do
|
||||
logAgent = if logAgent || logLevel == CLLDebug then Just $ agentLogLevel logLevel else Nothing,
|
||||
logFile,
|
||||
tbqSize,
|
||||
maxChats,
|
||||
deviceName,
|
||||
chatRelay,
|
||||
webPreviewConfig,
|
||||
|
||||
Reference in New Issue
Block a user