mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-06 20:39: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.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 {
|
||||||
@ -1279,6 +1271,7 @@ class ConversationInfoActivity :
|
|||||||
binding.recordingConsentView.recordingConsentAll.visibility = VISIBLE
|
binding.recordingConsentView.recordingConsentAll.visibility = VISIBLE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fun showSwitch() {
|
fun showSwitch() {
|
||||||
binding.recordingConsentView.recordingConsentForConversation.visibility = VISIBLE
|
binding.recordingConsentView.recordingConsentForConversation.visibility = VISIBLE
|
||||||
binding.recordingConsentView.recordingConsentAll.visibility = GONE
|
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() {
|
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