Update delete for everyone functionality to match requirements.

This commit is contained in:
Cody Henthorne
2020-07-02 12:37:58 -04:00
committed by Greyson Parrelli
parent c877aba09f
commit 1752972be9
9 changed files with 70 additions and 22 deletions

View File

@@ -10,6 +10,8 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.WorkerThread;
import com.annimon.stream.Stream;
import org.thoughtcrime.securesms.R;
import org.thoughtcrime.securesms.color.MaterialColor;
import org.thoughtcrime.securesms.contacts.avatars.ContactColors;
@@ -633,6 +635,10 @@ public class Recipient {
return groupId != null && groupId.isV2();
}
public boolean isActiveGroup() {
return Stream.of(getParticipants()).anyMatch(Recipient::isLocalNumber);
}
public @NonNull List<Recipient> getParticipants() {
return new ArrayList<>(participants);
}