only show delete and keep options for moderators of a conversation

Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
sowjanyakch 2025-05-20 10:18:57 +02:00 committed by Marcel Hibbe
parent 5512a47d32
commit 3007633873
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B

View File

@ -1246,6 +1246,16 @@ class ChatActivity :
)
}
if(ConversationUtils.isParticipantOwnerOrModerator(currentConversation!!)) {
binding.conversationDeleteNotice.findViewById<MaterialButton>(R.id.delete_now_button).visibility =
View.VISIBLE
binding.conversationDeleteNotice.findViewById<MaterialButton>(R.id.keep_button).visibility = View.VISIBLE
}else{
binding.conversationDeleteNotice.findViewById<MaterialButton>(R.id.delete_now_button).visibility =
View.GONE
binding.conversationDeleteNotice.findViewById<MaterialButton>(R.id.keep_button).visibility = View.GONE
}
binding.conversationDeleteNotice.findViewById<MaterialButton>(R.id.delete_now_button).setOnClickListener {
deleteConversationDialog(it.context)
}