mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-19 19:49:33 +01:00
add GUEST_MODERATOR to participant list sorting criteria
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
141458047f
commit
661c0cb04a
@ -700,6 +700,7 @@ class ConversationInfoController(args: Bundle) : BaseController(args), FlexibleA
|
||||
val moderatorTypes = ArrayList<Participant.ParticipantType>()
|
||||
moderatorTypes.add(Participant.ParticipantType.MODERATOR)
|
||||
moderatorTypes.add(Participant.ParticipantType.OWNER)
|
||||
moderatorTypes.add(Participant.ParticipantType.GUEST_MODERATOR)
|
||||
|
||||
if (moderatorTypes.contains(left.model.type) && !moderatorTypes.contains(right.model.type)) {
|
||||
return -1
|
||||
|
@ -103,6 +103,7 @@ public class Conversation {
|
||||
|
||||
public boolean isGuest() {
|
||||
return (Participant.ParticipantType.GUEST.equals(participantType) ||
|
||||
Participant.ParticipantType.GUEST_MODERATOR.equals(participantType) ||
|
||||
Participant.ParticipantType.USER_FOLLOWING_LINK.equals(participantType));
|
||||
}
|
||||
|
||||
@ -116,8 +117,9 @@ public class Conversation {
|
||||
}
|
||||
|
||||
public boolean isParticipantOwnerOrModerator() {
|
||||
return Participant.ParticipantType.OWNER.equals(participantType)
|
||||
|| Participant.ParticipantType.MODERATOR.equals(participantType);
|
||||
return (Participant.ParticipantType.OWNER.equals(participantType) ||
|
||||
Participant.ParticipantType.GUEST_MODERATOR.equals(participantType) ||
|
||||
Participant.ParticipantType.MODERATOR.equals(participantType));
|
||||
}
|
||||
|
||||
public boolean shouldShowLobby(UserEntity conversationUser) {
|
||||
|
@ -37,10 +37,11 @@ public class EnumParticipantTypeConverter extends IntBasedTypeConverter<Particip
|
||||
return Participant.ParticipantType.GUEST;
|
||||
case 5:
|
||||
return Participant.ParticipantType.USER_FOLLOWING_LINK;
|
||||
case 6:
|
||||
return Participant.ParticipantType.GUEST_MODERATOR;
|
||||
default:
|
||||
return Participant.ParticipantType.DUMMY;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -58,6 +59,8 @@ public class EnumParticipantTypeConverter extends IntBasedTypeConverter<Particip
|
||||
return 4;
|
||||
case USER_FOLLOWING_LINK:
|
||||
return 5;
|
||||
case GUEST_MODERATOR:
|
||||
return 6;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
@ -84,7 +84,8 @@ public class Participant {
|
||||
MODERATOR,
|
||||
USER,
|
||||
GUEST,
|
||||
USER_FOLLOWING_LINK
|
||||
USER_FOLLOWING_LINK,
|
||||
GUEST_MODERATOR
|
||||
}
|
||||
|
||||
public enum ParticipantFlags {
|
||||
|
Loading…
Reference in New Issue
Block a user