mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 00:37:47 +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() {
|
||||
recipients = contactsFragment.getSelectedContacts();
|
||||
recipients.append(recentFragment.getSelectedContacts());
|
||||
recipients.append(groupsFragment.getSelectedContacts());
|
||||
recipients.append(groupsFragment.getSelectedContacts(this));
|
||||
|
||||
Intent resultIntent = getIntent();
|
||||
resultIntent.putExtra("recipients", this.recipients);
|
||||
|
@ -84,12 +84,12 @@ public class ContactSelectionGroupsFragment extends SherlockListFragment
|
||||
this.getListView().setFocusable(true);
|
||||
}
|
||||
|
||||
public Recipients getSelectedContacts() {
|
||||
public Recipients getSelectedContacts(Context context) {
|
||||
List<Recipient> recipientList = new LinkedList<Recipient>();
|
||||
|
||||
for (GroupData groupData : selectedGroups.values()) {
|
||||
List<ContactData> contactDataList = ContactAccessor.getInstance()
|
||||
.getGroupMembership(getActivity(), groupData.id);
|
||||
.getGroupMembership(context, groupData.id);
|
||||
|
||||
Log.w("GroupSelectionListActivity", "Got contacts in group: " + contactDataList.size());
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user