mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Fixed allowEndToEndEncryptedChatWithoutPresence setting + added the same one but for group chat
This commit is contained in:
parent
238ee8dc63
commit
69b82e9954
2 changed files with 10 additions and 2 deletions
|
|
@ -63,7 +63,9 @@ class ChatRoomCreationFragment : SecureFragment<ChatRoomCreationFragmentBinding>
|
|||
binding.viewModel = viewModel
|
||||
|
||||
adapter = ContactsSelectionAdapter(viewLifecycleOwner)
|
||||
adapter.setGroupChatCapabilityRequired(viewModel.createGroupChat.value == true)
|
||||
adapter.setGroupChatCapabilityRequired(
|
||||
viewModel.createGroupChat.value == true && !corePreferences.allowGroupChatWithoutPresence
|
||||
)
|
||||
adapter.setLimeCapabilityRequired(
|
||||
viewModel.isEncrypted.value == true && !corePreferences.allowEndToEndEncryptedChatWithoutPresence
|
||||
)
|
||||
|
|
@ -96,7 +98,9 @@ class ChatRoomCreationFragment : SecureFragment<ChatRoomCreationFragmentBinding>
|
|||
viewModel.isEncrypted.observe(
|
||||
viewLifecycleOwner
|
||||
) {
|
||||
adapter.setLimeCapabilityRequired(it)
|
||||
adapter.setLimeCapabilityRequired(
|
||||
it && !corePreferences.allowEndToEndEncryptedChatWithoutPresence
|
||||
)
|
||||
}
|
||||
|
||||
viewModel.sipContactsSelected.observe(
|
||||
|
|
|
|||
|
|
@ -502,6 +502,10 @@ class CorePreferences constructor(private val context: Context) {
|
|||
val allowEndToEndEncryptedChatWithoutPresence: Boolean
|
||||
get() = config.getBool("app", "allow_lime_friend_without_capability", false)
|
||||
|
||||
// Turning this ON will show the group chat button even if there is no conference capability in presence (or no presence)
|
||||
val allowGroupChatWithoutPresence: Boolean
|
||||
get() = config.getBool("app", "allow_group_friend_without_capability", false)
|
||||
|
||||
val showEmojiPickerButton: Boolean
|
||||
get() = config.getBool("app", "show_emoji_picker", true)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue