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:
Moxie Marlinspike
2017-08-01 08:56:00 -07:00
parent 81682e0302
commit 375207f073
106 changed files with 1587 additions and 2192 deletions

View File

@@ -7,14 +7,15 @@ import android.widget.TextView;
import org.thoughtcrime.securesms.R;
import org.thoughtcrime.securesms.components.AvatarImageView;
import org.thoughtcrime.securesms.recipients.Recipients;
import org.thoughtcrime.securesms.recipients.Recipient;
import org.thoughtcrime.securesms.recipients.RecipientModifiedListener;
import org.thoughtcrime.securesms.util.Util;
public class BlockedContactListItem extends RelativeLayout implements Recipients.RecipientsModifiedListener {
public class BlockedContactListItem extends RelativeLayout implements RecipientModifiedListener {
private AvatarImageView contactPhotoImage;
private TextView nameView;
private Recipients recipients;
private Recipient recipient;
public BlockedContactListItem(Context context) {
super(context);
@@ -35,15 +36,15 @@ public class BlockedContactListItem extends RelativeLayout implements Recipients
this.nameView = (TextView) findViewById(R.id.name);
}
public void set(Recipients recipients) {
this.recipients = recipients;
public void set(Recipient recipients) {
this.recipient = recipients;
onModified(recipients);
recipients.addListener(this);
}
@Override
public void onModified(final Recipients recipients) {
public void onModified(final Recipient recipients) {
final AvatarImageView contactPhotoImage = this.contactPhotoImage;
final TextView nameView = this.nameView;
@@ -56,7 +57,7 @@ public class BlockedContactListItem extends RelativeLayout implements Recipients
});
}
public Recipients getRecipients() {
return recipients;
public Recipient getRecipient() {
return recipient;
}
}