mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 09:20:19 +01:00
Add additional call links moderation ui.
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
package org.thoughtcrime.securesms.events;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.core.os.ParcelCompat;
|
||||
|
||||
import org.thoughtcrime.securesms.recipients.Recipient;
|
||||
import org.thoughtcrime.securesms.recipients.RecipientId;
|
||||
@@ -11,7 +15,7 @@ import java.util.Objects;
|
||||
* Allow system to identify a call participant by their device demux id and their
|
||||
* recipient id.
|
||||
*/
|
||||
public final class CallParticipantId {
|
||||
public final class CallParticipantId implements Parcelable {
|
||||
|
||||
public static final long DEFAULT_ID = -1;
|
||||
|
||||
@@ -48,4 +52,34 @@ public final class CallParticipantId {
|
||||
public int hashCode() {
|
||||
return Objects.hash(demuxId, recipientId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(@NonNull Parcel dest, int flags) {
|
||||
dest.writeLong(demuxId);
|
||||
dest.writeParcelable(recipientId, flags);
|
||||
}
|
||||
|
||||
public static final Parcelable.Creator<CallParticipantId> CREATOR = new Parcelable.Creator<CallParticipantId>() {
|
||||
@Override
|
||||
public CallParticipantId createFromParcel(Parcel in) {
|
||||
return new CallParticipantId(
|
||||
in.readLong(),
|
||||
Objects.requireNonNull(
|
||||
ParcelCompat.readParcelable(in,
|
||||
RecipientId.class.getClassLoader(),
|
||||
RecipientId.class)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CallParticipantId[] newArray(int size) {
|
||||
return new CallParticipantId[size];
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -94,6 +94,7 @@ class WebRtcViewModel(state: WebRtcServiceState) {
|
||||
val remoteDevicesCount: OptionalLong = state.callInfoState.remoteDevicesCount
|
||||
val participantLimit: Long? = state.callInfoState.participantLimit
|
||||
val pendingParticipants: PendingParticipantCollection = state.callInfoState.pendingParticipants
|
||||
val isCallLink: Boolean = state.callInfoState.callRecipient.isCallLink
|
||||
|
||||
@get:JvmName("shouldRingGroup")
|
||||
val ringGroup: Boolean = state.getCallSetupState(state.callInfoState.activePeer?.callId).ringGroup
|
||||
|
||||
Reference in New Issue
Block a user