mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 12:09:45 +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>()
|
val moderatorTypes = ArrayList<Participant.ParticipantType>()
|
||||||
moderatorTypes.add(Participant.ParticipantType.MODERATOR)
|
moderatorTypes.add(Participant.ParticipantType.MODERATOR)
|
||||||
moderatorTypes.add(Participant.ParticipantType.OWNER)
|
moderatorTypes.add(Participant.ParticipantType.OWNER)
|
||||||
|
moderatorTypes.add(Participant.ParticipantType.GUEST_MODERATOR)
|
||||||
|
|
||||||
if (moderatorTypes.contains(left.model.type) && !moderatorTypes.contains(right.model.type)) {
|
if (moderatorTypes.contains(left.model.type) && !moderatorTypes.contains(right.model.type)) {
|
||||||
return -1
|
return -1
|
||||||
|
@ -103,6 +103,7 @@ public class Conversation {
|
|||||||
|
|
||||||
public boolean isGuest() {
|
public boolean isGuest() {
|
||||||
return (Participant.ParticipantType.GUEST.equals(participantType) ||
|
return (Participant.ParticipantType.GUEST.equals(participantType) ||
|
||||||
|
Participant.ParticipantType.GUEST_MODERATOR.equals(participantType) ||
|
||||||
Participant.ParticipantType.USER_FOLLOWING_LINK.equals(participantType));
|
Participant.ParticipantType.USER_FOLLOWING_LINK.equals(participantType));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,8 +117,9 @@ public class Conversation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isParticipantOwnerOrModerator() {
|
public boolean isParticipantOwnerOrModerator() {
|
||||||
return Participant.ParticipantType.OWNER.equals(participantType)
|
return (Participant.ParticipantType.OWNER.equals(participantType) ||
|
||||||
|| Participant.ParticipantType.MODERATOR.equals(participantType);
|
Participant.ParticipantType.GUEST_MODERATOR.equals(participantType) ||
|
||||||
|
Participant.ParticipantType.MODERATOR.equals(participantType));
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean shouldShowLobby(UserEntity conversationUser) {
|
public boolean shouldShowLobby(UserEntity conversationUser) {
|
||||||
|
@ -37,10 +37,11 @@ public class EnumParticipantTypeConverter extends IntBasedTypeConverter<Particip
|
|||||||
return Participant.ParticipantType.GUEST;
|
return Participant.ParticipantType.GUEST;
|
||||||
case 5:
|
case 5:
|
||||||
return Participant.ParticipantType.USER_FOLLOWING_LINK;
|
return Participant.ParticipantType.USER_FOLLOWING_LINK;
|
||||||
|
case 6:
|
||||||
|
return Participant.ParticipantType.GUEST_MODERATOR;
|
||||||
default:
|
default:
|
||||||
return Participant.ParticipantType.DUMMY;
|
return Participant.ParticipantType.DUMMY;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -58,6 +59,8 @@ public class EnumParticipantTypeConverter extends IntBasedTypeConverter<Particip
|
|||||||
return 4;
|
return 4;
|
||||||
case USER_FOLLOWING_LINK:
|
case USER_FOLLOWING_LINK:
|
||||||
return 5;
|
return 5;
|
||||||
|
case GUEST_MODERATOR:
|
||||||
|
return 6;
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -84,7 +84,8 @@ public class Participant {
|
|||||||
MODERATOR,
|
MODERATOR,
|
||||||
USER,
|
USER,
|
||||||
GUEST,
|
GUEST,
|
||||||
USER_FOLLOWING_LINK
|
USER_FOLLOWING_LINK,
|
||||||
|
GUEST_MODERATOR
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum ParticipantFlags {
|
public enum ParticipantFlags {
|
||||||
|
Loading…
Reference in New Issue
Block a user