core, mobile: prohibit to change chat item expiration when chat is stopped (#2210)

This commit is contained in:
spaced4ndy
2023-04-19 15:21:28 +04:00
committed by GitHub
parent 23ca3dd665
commit 5bf16da09d
3 changed files with 3 additions and 3 deletions

View File

@@ -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) {

View File

@@ -77,7 +77,7 @@ struct DatabaseView: View {
}
}
.frame(height: 36)
.disabled(m.chatDbChanged || progressIndicator)
.disabled(stopped || progressIndicator)
} header: {
Text("Messages")
} footer: {