mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-27 06:35:37 +01:00
Merge pull request #5099 from nextcloud/fix_delete_all_messages
Show delete all messages in 1:1 only when canDeleteConversation is true
This commit is contained in:
commit
a3a5272dbb
@ -1065,21 +1065,13 @@ class ConversationInfoActivity :
|
|||||||
) {
|
) {
|
||||||
binding.addParticipantsAction.visibility = GONE
|
binding.addParticipantsAction.visibility = GONE
|
||||||
binding.startGroupChat.visibility = VISIBLE
|
binding.startGroupChat.visibility = VISIBLE
|
||||||
|
showDeleteAllMessagesOption(conversationCopy)
|
||||||
} else if (ConversationUtils.canModerate(conversationCopy, spreedCapabilities)) {
|
} else if (ConversationUtils.canModerate(conversationCopy, spreedCapabilities)) {
|
||||||
binding.addParticipantsAction.visibility = VISIBLE
|
binding.addParticipantsAction.visibility = VISIBLE
|
||||||
if (hasSpreedFeatureCapability(
|
showDeleteAllMessagesOption(conversationCopy)
|
||||||
spreedCapabilities,
|
|
||||||
SpreedFeatures.CLEAR_HISTORY
|
|
||||||
) && conversationCopy.canDeleteConversation
|
|
||||||
) {
|
|
||||||
binding.clearConversationHistory.visibility = VISIBLE
|
|
||||||
} else {
|
|
||||||
binding.clearConversationHistory.visibility = GONE
|
|
||||||
}
|
|
||||||
showOptionsMenu()
|
showOptionsMenu()
|
||||||
} else {
|
} else {
|
||||||
binding.addParticipantsAction.visibility = GONE
|
binding.addParticipantsAction.visibility = GONE
|
||||||
|
|
||||||
if (ConversationUtils.isNoteToSelfConversation(conversation)) {
|
if (ConversationUtils.isNoteToSelfConversation(conversation)) {
|
||||||
binding.notificationSettingsView.notificationSettings.visibility = VISIBLE
|
binding.notificationSettingsView.notificationSettings.visibility = VISIBLE
|
||||||
} else {
|
} else {
|
||||||
@ -1311,6 +1303,18 @@ class ConversationInfoActivity :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun showDeleteAllMessagesOption(conversationCopy: ConversationModel) {
|
||||||
|
if (hasSpreedFeatureCapability(
|
||||||
|
spreedCapabilities,
|
||||||
|
SpreedFeatures.CLEAR_HISTORY
|
||||||
|
) && conversationCopy.canDeleteConversation
|
||||||
|
) {
|
||||||
|
binding.clearConversationHistory.visibility = VISIBLE
|
||||||
|
} else {
|
||||||
|
binding.clearConversationHistory.visibility = GONE
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun submitRecordingConsentChanges() {
|
private fun submitRecordingConsentChanges() {
|
||||||
val state = if (binding.recordingConsentView.recordingConsentForConversationSwitch.isChecked) {
|
val state = if (binding.recordingConsentView.recordingConsentForConversationSwitch.isChecked) {
|
||||||
RECORDING_CONSENT_REQUIRED_FOR_CONVERSATION
|
RECORDING_CONSENT_REQUIRED_FOR_CONVERSATION
|
||||||
|
Loading…
Reference in New Issue
Block a user