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

@@ -8,22 +8,22 @@ import android.view.View.OnClickListener;
import org.thoughtcrime.securesms.R;
import org.thoughtcrime.securesms.database.DatabaseFactory;
import org.thoughtcrime.securesms.recipients.Recipients;
import org.thoughtcrime.securesms.recipients.Recipient;
public class InviteReminder extends Reminder {
public InviteReminder(final @NonNull Context context,
final @NonNull Recipients recipients)
final @NonNull Recipient recipient)
{
super(context.getString(R.string.reminder_header_invite_title),
context.getString(R.string.reminder_header_invite_text, recipients.toShortString()));
context.getString(R.string.reminder_header_invite_text, recipient.toShortString()));
setDismissListener(new OnClickListener() {
@Override public void onClick(View v) {
new AsyncTask<Void,Void,Void>() {
@Override protected Void doInBackground(Void... params) {
DatabaseFactory.getRecipientPreferenceDatabase(context).setSeenInviteReminder(recipients, true);
DatabaseFactory.getRecipientPreferenceDatabase(context).setSeenInviteReminder(recipient, true);
return null;
}
}.execute();