add GUEST_MODERATOR to participant list sorting criteria

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2021-04-15 10:35:36 +02:00 committed by Marcel Hibbe
parent 141458047f
commit 661c0cb04a
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B
4 changed files with 11 additions and 4 deletions

View File

@ -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

View File

@ -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) {

View File

@ -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;
}

View File

@ -84,7 +84,8 @@ public class Participant {
MODERATOR,
USER,
GUEST,
USER_FOLLOWING_LINK
USER_FOLLOWING_LINK,
GUEST_MODERATOR
}
public enum ParticipantFlags {