Fixed contacts list empty after device rotation
This commit is contained in:
parent
ff5698986d
commit
1a01d41db4
2 changed files with 6 additions and 3 deletions
|
@ -113,7 +113,6 @@ public class ContactsListAdapter extends SelectableAdapter<ContactsListAdapter.V
|
|||
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.contact_cell, parent, false);
|
||||
return new ViewHolder(v, mClickListener);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -206,8 +206,12 @@ public class ContactsManager extends ContentObserver implements FriendListListen
|
|||
}
|
||||
|
||||
public void initializeContactManager(Activity activity) {
|
||||
mActivity = activity;
|
||||
mActivity.getLoaderManager().initLoader(CONTACTS_LOADER, null, this);
|
||||
if (mActivity == null) {
|
||||
mActivity = activity;
|
||||
mActivity.getLoaderManager().initLoader(CONTACTS_LOADER, null, this);
|
||||
} else if (mActivity != activity){
|
||||
mActivity = activity;
|
||||
}
|
||||
}
|
||||
|
||||
public void initializeSyncAccount(Activity activity) {
|
||||
|
|
Loading…
Reference in a new issue