mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-20 00:29:11 +01:00
Switch MMS groups to use the group database infrastructure
Eliminate the concept of 'Recipients' (plural). There is now just a 'Recipient', which contains an Address that is either an individual or a group ID. MMS groups now exist as part of the group database, just like push groups. // FREEBIE
This commit is contained in:
@@ -9,7 +9,7 @@ import org.thoughtcrime.securesms.database.RecipientPreferenceDatabase.BlockedRe
|
||||
import org.thoughtcrime.securesms.dependencies.InjectableType;
|
||||
import org.thoughtcrime.securesms.dependencies.SignalCommunicationModule.SignalMessageSenderFactory;
|
||||
import org.thoughtcrime.securesms.jobs.requirements.MasterSecretRequirement;
|
||||
import org.thoughtcrime.securesms.recipients.Recipients;
|
||||
import org.thoughtcrime.securesms.recipients.Recipient;
|
||||
import org.whispersystems.jobqueue.JobParameters;
|
||||
import org.whispersystems.jobqueue.requirements.NetworkRequirement;
|
||||
import org.whispersystems.signalservice.api.SignalServiceMessageSender;
|
||||
@@ -50,11 +50,11 @@ public class MultiDeviceBlockedUpdateJob extends MasterSecretJob implements Inje
|
||||
BlockedReader reader = database.readerForBlocked(database.getBlocked());
|
||||
List<String> blocked = new LinkedList<>();
|
||||
|
||||
Recipients recipients;
|
||||
Recipient recipient;
|
||||
|
||||
while ((recipients = reader.getNext()) != null) {
|
||||
if (recipients.isSingleRecipient() && !recipients.isGroupRecipient()) {
|
||||
blocked.add(recipients.getPrimaryRecipient().getAddress().serialize());
|
||||
while ((recipient = reader.getNext()) != null) {
|
||||
if (!recipient.isGroupRecipient()) {
|
||||
blocked.add(recipient.getAddress().serialize());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user