hide call notification setting for federated rooms

because right now it's response is http 406 as calls are not implemented for federation

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2024-03-20 17:38:43 +01:00
parent 7e57ecaf79
commit 2cec1637e8
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B

View File

@ -199,7 +199,7 @@ class ConversationInfoActivity :
if (databaseStorageModule == null) {
databaseStorageModule = DatabaseStorageModule(conversationUser, conversationToken)
}
setUpNotificationSettings(databaseStorageModule!!)
binding.deleteConversationAction.setOnClickListener { showDeleteConversationDialog() }
binding.leaveConversationAction.setOnClickListener { leaveConversation() }
binding.clearConversationHistory.setOnClickListener { showClearHistoryDialog() }
@ -690,6 +690,8 @@ class ConversationInfoActivity :
private fun handleConversation() {
val conversationCopy = conversation!!
setUpNotificationSettings(databaseStorageModule!!)
if (CapabilitiesUtil.hasSpreedFeatureCapability(spreedCapabilities, SpreedFeatures.RICH_OBJECT_LIST_MEDIA) &&
conversationCopy.remoteServer.isNullOrEmpty()
) {
@ -1347,8 +1349,13 @@ class ConversationInfoActivity :
binding.notificationSettingsView.importantConversationSwitch.isChecked = module
.getBoolean("important_conversation_switch", false)
binding.notificationSettingsView.callNotificationsSwitch.isChecked = module
.getBoolean("call_notifications_switch", true)
if (conversation!!.remoteServer.isNullOrEmpty()) {
binding.notificationSettingsView.notificationSettingsCallNotifications.visibility = VISIBLE
binding.notificationSettingsView.callNotificationsSwitch.isChecked = module
.getBoolean("call_notifications_switch", true)
} else {
binding.notificationSettingsView.notificationSettingsCallNotifications.visibility = GONE
}
}
companion object {