mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-06 12:29:47 +01:00
show delete all messages option in 1:1 conversation when canDeleteConversation is true
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
parent
99d5fc7d19
commit
94db4e6892
@ -1065,21 +1065,13 @@ class ConversationInfoActivity :
|
||||
) {
|
||||
binding.addParticipantsAction.visibility = GONE
|
||||
binding.startGroupChat.visibility = VISIBLE
|
||||
showDeleteAllMessagesOption(conversationCopy)
|
||||
} else if (ConversationUtils.canModerate(conversationCopy, spreedCapabilities)) {
|
||||
binding.addParticipantsAction.visibility = VISIBLE
|
||||
if (hasSpreedFeatureCapability(
|
||||
spreedCapabilities,
|
||||
SpreedFeatures.CLEAR_HISTORY
|
||||
) && conversationCopy.canDeleteConversation
|
||||
) {
|
||||
binding.clearConversationHistory.visibility = VISIBLE
|
||||
} else {
|
||||
binding.clearConversationHistory.visibility = GONE
|
||||
}
|
||||
showDeleteAllMessagesOption(conversationCopy)
|
||||
showOptionsMenu()
|
||||
} else {
|
||||
binding.addParticipantsAction.visibility = GONE
|
||||
|
||||
if (ConversationUtils.isNoteToSelfConversation(conversation)) {
|
||||
binding.notificationSettingsView.notificationSettings.visibility = VISIBLE
|
||||
} else {
|
||||
@ -1279,6 +1271,7 @@ class ConversationInfoActivity :
|
||||
binding.recordingConsentView.recordingConsentAll.visibility = VISIBLE
|
||||
}
|
||||
|
||||
|
||||
fun showSwitch() {
|
||||
binding.recordingConsentView.recordingConsentForConversation.visibility = VISIBLE
|
||||
binding.recordingConsentView.recordingConsentAll.visibility = GONE
|
||||
@ -1311,6 +1304,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() {
|
||||
val state = if (binding.recordingConsentView.recordingConsentForConversationSwitch.isChecked) {
|
||||
RECORDING_CONSENT_REQUIRED_FOR_CONVERSATION
|
||||
|
Loading…
Reference in New Issue
Block a user