mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-24 15:02:02 +00:00
Support for multi-device.
1) In addition to the Recipient interface, there is now RecipientDevice. A Recipient can have multiple corresponding RecipientDevices. All addressing is done to a Recipient, but crypto sessions and transport delivery are done to RecipientDevice. 2) The Push transport handles the discovery and session setup of additional Recipient devices. 3) Some internal rejiggering of Groups.
This commit is contained in:
@@ -24,6 +24,7 @@ import android.view.View;
|
||||
import android.widget.RelativeLayout;
|
||||
|
||||
import org.thoughtcrime.securesms.R;
|
||||
import org.thoughtcrime.securesms.contacts.ContactAccessor;
|
||||
import org.thoughtcrime.securesms.contacts.RecipientsAdapter;
|
||||
import org.thoughtcrime.securesms.contacts.RecipientsEditor;
|
||||
import org.thoughtcrime.securesms.recipients.Recipient;
|
||||
@@ -69,6 +70,14 @@ public class RecipientsPanel extends RelativeLayout {
|
||||
else recipientsText.append(number + ", ");
|
||||
}
|
||||
|
||||
public void addContacts(List<ContactAccessor.ContactData> contacts) {
|
||||
for (ContactAccessor.ContactData contact : contacts) {
|
||||
for (ContactAccessor.NumberData number : contact.numbers) {
|
||||
addRecipient(contact.name, number.number);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void addRecipients(Recipients recipients) {
|
||||
List<Recipient> recipientList = recipients.getRecipientsList();
|
||||
Iterator<Recipient> iterator = recipientList.iterator();
|
||||
|
||||
Reference in New Issue
Block a user