Fix issue when single user leaves ParticipantCollection.

This commit is contained in:
Alex Hart
2021-01-14 06:53:18 -04:00
parent ff11609a82
commit 790f8426ac
2 changed files with 32 additions and 1 deletions

View File

@@ -62,7 +62,7 @@ public class ParticipantCollection {
.indexOf(oldId);
if (newIndex != -1 && newIndex != i) {
Collections.swap(newParticipants, newIndex, i);
Collections.swap(newParticipants, newIndex, Math.min(i, newParticipants.size() - 1));
}
}