mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-08-29 05:29:08 +00:00
core, mobile: prohibit to change chat item expiration when chat is stopped (#2210)
This commit is contained in:
@@ -160,7 +160,7 @@ fun DatabaseLayout(
|
||||
AppBarTitle(stringResource(R.string.your_chat_database))
|
||||
|
||||
SectionView(stringResource(R.string.messages_section_title).uppercase()) {
|
||||
SectionItemView { TtlOptions(chatItemTTL, enabled = rememberUpdatedState(!progressIndicator && !chatDbChanged), onChatItemTTLSelected) }
|
||||
SectionItemView { TtlOptions(chatItemTTL, enabled = rememberUpdatedState(!stopped && !progressIndicator), onChatItemTTLSelected) }
|
||||
}
|
||||
SectionTextFooter(
|
||||
remember(currentUser?.displayName) {
|
||||
|
||||
@@ -77,7 +77,7 @@ struct DatabaseView: View {
|
||||
}
|
||||
}
|
||||
.frame(height: 36)
|
||||
.disabled(m.chatDbChanged || progressIndicator)
|
||||
.disabled(stopped || progressIndicator)
|
||||
} header: {
|
||||
Text("Messages")
|
||||
} footer: {
|
||||
|
||||
+1
-1
@@ -939,7 +939,7 @@ processChatCommand = \case
|
||||
CRServerTestResult user srv <$> withAgent (\a -> testProtocolServer a (aUserId user) server)
|
||||
TestProtoServer srv -> withUser $ \User {userId} ->
|
||||
processChatCommand $ APITestProtoServer userId srv
|
||||
APISetChatItemTTL userId newTTL_ -> withUser' $ \user -> do
|
||||
APISetChatItemTTL userId newTTL_ -> withUser $ \user -> do
|
||||
checkSameUser userId user
|
||||
checkStoreNotChanged $
|
||||
withChatLock "setChatItemTTL" $ do
|
||||
|
||||
Reference in New Issue
Block a user