mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 03:59:35 +01:00
check if attendeePin exists
resolves #1314 Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
8abe99fc5a
commit
0b49b65094
@ -94,8 +94,8 @@ class ConversationInfoController(args: Bundle) :
|
|||||||
R.layout.controller_conversation_info,
|
R.layout.controller_conversation_info,
|
||||||
args
|
args
|
||||||
),
|
),
|
||||||
FlexibleAdapter
|
FlexibleAdapter.OnItemClickListener {
|
||||||
.OnItemClickListener {
|
|
||||||
private val binding: ControllerConversationInfoBinding by viewBinding(ControllerConversationInfoBinding::bind)
|
private val binding: ControllerConversationInfoBinding by viewBinding(ControllerConversationInfoBinding::bind)
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
@ -855,7 +855,7 @@ class ConversationInfoController(args: Bundle) :
|
|||||||
val apiVersion = ApiUtils.getConversationApiVersion(conversationUser, intArrayOf(ApiUtils.APIv4, 1))
|
val apiVersion = ApiUtils.getConversationApiVersion(conversationUser, intArrayOf(ApiUtils.APIv4, 1))
|
||||||
|
|
||||||
if (participant.getActorType() == USERS && participant.getActorId() == conversationUser!!.userId) {
|
if (participant.getActorType() == USERS && participant.getActorId() == conversationUser!!.userId) {
|
||||||
if (participant.attendeePin.isNotEmpty()) {
|
if (participant.attendeePin?.isNotEmpty() == true) {
|
||||||
val items = mutableListOf(
|
val items = mutableListOf(
|
||||||
BasicListItemWithImage(
|
BasicListItemWithImage(
|
||||||
R.drawable.ic_lock_grey600_24px,
|
R.drawable.ic_lock_grey600_24px,
|
||||||
@ -948,7 +948,7 @@ class ConversationInfoController(args: Bundle) :
|
|||||||
items.removeAt(1)
|
items.removeAt(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (participant.attendeePin.isEmpty()) {
|
if (participant.attendeePin == null || participant.attendeePin.isEmpty()) {
|
||||||
items.removeAt(0)
|
items.removeAt(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -959,7 +959,7 @@ class ConversationInfoController(args: Bundle) :
|
|||||||
title(text = participant.displayName)
|
title(text = participant.displayName)
|
||||||
listItemsWithImage(items = items) { dialog, index, _ ->
|
listItemsWithImage(items = items) { dialog, index, _ ->
|
||||||
var actionToTrigger = index
|
var actionToTrigger = index
|
||||||
if (participant.attendeePin.isEmpty()) {
|
if (participant.attendeePin == null || participant.attendeePin.isEmpty()) {
|
||||||
actionToTrigger++
|
actionToTrigger++
|
||||||
}
|
}
|
||||||
if (participant.type == Participant.ParticipantType.USER_FOLLOWING_LINK) {
|
if (participant.type == Participant.ParticipantType.USER_FOLLOWING_LINK) {
|
||||||
|
Loading…
Reference in New Issue
Block a user