Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
sowjanyakch 2025-05-20 14:02:02 +02:00 committed by Marcel Hibbe
parent 8f46531699
commit 61af44f3f4
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B

View File

@ -1049,11 +1049,6 @@ class ConversationInfoActivity :
viewModel.getRoom(conversationUser, conversationToken) viewModel.getRoom(conversationUser, conversationToken)
} }
binding.notificationSettingsView.notificationSettingsSensitiveConversation.setOnClickListener {
val isChecked = binding.notificationSettingsView.sensitiveConversationSwitch.isChecked
binding.notificationSettingsView.callNotificationsSwitch.isChecked = !isChecked
}
if (conversation!!.hasArchived) { if (conversation!!.hasArchived) {
binding.archiveConversationIcon binding.archiveConversationIcon
.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ic_eye, null)) .setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ic_eye, null))
@ -1066,12 +1061,24 @@ class ConversationInfoActivity :
binding.archiveConversationTextHint.text = resources.getString(R.string.archive_hint) binding.archiveConversationTextHint.text = resources.getString(R.string.archive_hint)
} }
binding.notificationSettingsView.sensitiveConversationSwitch.setOnCheckedChangeListener { _, isChecked ->
binding.notificationSettingsView.callNotificationsSwitch.isChecked = !isChecked binding.notificationSettingsView.sensitiveConversationSwitch.isChecked = conversation!!.hasSensitive
binding.notificationSettingsView.notificationSettingsSensitiveConversation.setOnClickListener {
val isChecked = !binding.notificationSettingsView.sensitiveConversationSwitch.isChecked
binding.notificationSettingsView.sensitiveConversationSwitch.isChecked = isChecked
if (isChecked) { if (isChecked) {
viewModel.markConversationAsSensitive(credentials, conversationUser.baseUrl!!, conversation?.token!!) viewModel.markConversationAsSensitive(
credentials,
conversationUser.baseUrl!!,
conversation?.token!!
)
} else { } else {
viewModel.markConversationAsInsensitive(credentials, conversationUser.baseUrl!!, conversation?.token!!) viewModel.markConversationAsInsensitive(
credentials,
conversationUser.baseUrl!!,
conversation?.token!!
)
} }
} }
if (hasSpreedFeatureCapability(spreedCapabilities, SpreedFeatures.SENSITIVE_CONVERSATIONS)) { if (hasSpreedFeatureCapability(spreedCapabilities, SpreedFeatures.SENSITIVE_CONVERSATIONS)) {
@ -1777,8 +1784,6 @@ class ConversationInfoActivity :
binding.notificationSettingsView.importantConversationSwitch.isChecked = module binding.notificationSettingsView.importantConversationSwitch.isChecked = module
.getBoolean("important_conversation_switch", false) .getBoolean("important_conversation_switch", false)
binding.notificationSettingsView.sensitiveConversationSwitch.isChecked = conversation!!.hasSensitive
if (conversation!!.remoteServer.isNullOrEmpty()) { if (conversation!!.remoteServer.isNullOrEmpty()) {
binding.notificationSettingsView.notificationSettingsCallNotifications.visibility = VISIBLE binding.notificationSettingsView.notificationSettingsCallNotifications.visibility = VISIBLE
binding.notificationSettingsView.callNotificationsSwitch.isChecked = module binding.notificationSettingsView.callNotificationsSwitch.isChecked = module