That fuck shit the fascists are using
at master 32 lines 991 B view raw
1package org.tm.archive.events; 2 3import androidx.annotation.NonNull; 4import androidx.annotation.Nullable; 5 6import org.tm.archive.recipients.RecipientId; 7 8public final class GroupCallPeekEvent { 9 private final RecipientId groupRecipientId; 10 private final String eraId; 11 private final long deviceCount; 12 private final long deviceLimit; 13 14 public GroupCallPeekEvent(@NonNull RecipientId groupRecipientId, @Nullable String eraId, @Nullable Long deviceCount, @Nullable Long deviceLimit) { 15 this.groupRecipientId = groupRecipientId; 16 this.eraId = eraId; 17 this.deviceCount = deviceCount != null ? deviceCount : 0; 18 this.deviceLimit = deviceLimit != null ? deviceLimit : 0; 19 } 20 21 public @NonNull RecipientId getGroupRecipientId() { 22 return groupRecipientId; 23 } 24 25 public boolean isOngoing() { 26 return eraId != null && deviceCount > 0; 27 } 28 29 public boolean callHasCapacity() { 30 return isOngoing() && deviceCount < deviceLimit; 31 } 32}