mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 16:57:50 +00:00
Fix for NPE when group selection fragment is no longer attached to activity.
This commit is contained in:
parent
0534f9d95a
commit
ad1d927437
@ -84,7 +84,7 @@ public class ContactSelectionActivity extends PassphraseRequiredSherlockFragment
|
|||||||
private void handleSelectionFinished() {
|
private void handleSelectionFinished() {
|
||||||
recipients = contactsFragment.getSelectedContacts();
|
recipients = contactsFragment.getSelectedContacts();
|
||||||
recipients.append(recentFragment.getSelectedContacts());
|
recipients.append(recentFragment.getSelectedContacts());
|
||||||
recipients.append(groupsFragment.getSelectedContacts());
|
recipients.append(groupsFragment.getSelectedContacts(this));
|
||||||
|
|
||||||
Intent resultIntent = getIntent();
|
Intent resultIntent = getIntent();
|
||||||
resultIntent.putExtra("recipients", this.recipients);
|
resultIntent.putExtra("recipients", this.recipients);
|
||||||
|
@ -84,12 +84,12 @@ public class ContactSelectionGroupsFragment extends SherlockListFragment
|
|||||||
this.getListView().setFocusable(true);
|
this.getListView().setFocusable(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Recipients getSelectedContacts() {
|
public Recipients getSelectedContacts(Context context) {
|
||||||
List<Recipient> recipientList = new LinkedList<Recipient>();
|
List<Recipient> recipientList = new LinkedList<Recipient>();
|
||||||
|
|
||||||
for (GroupData groupData : selectedGroups.values()) {
|
for (GroupData groupData : selectedGroups.values()) {
|
||||||
List<ContactData> contactDataList = ContactAccessor.getInstance()
|
List<ContactData> contactDataList = ContactAccessor.getInstance()
|
||||||
.getGroupMembership(getActivity(), groupData.id);
|
.getGroupMembership(context, groupData.id);
|
||||||
|
|
||||||
Log.w("GroupSelectionListActivity", "Got contacts in group: " + contactDataList.size());
|
Log.w("GroupSelectionListActivity", "Got contacts in group: " + contactDataList.size());
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user