refactor(follower): move null check in called method
This commit is contained in:
parent
e4f4ca5392
commit
4da6016e06
|
@ -74,6 +74,8 @@ public abstract class BaseAccountListFragment extends RecyclerFragment<BaseAccou
|
|||
|
||||
@Override
|
||||
protected void onDataLoaded(List<AccountItem> d, boolean more){
|
||||
if (getActivity() == null)
|
||||
return;
|
||||
if(refreshing){
|
||||
relationships.clear();
|
||||
}
|
||||
|
|
|
@ -47,7 +47,6 @@ public abstract class PaginatedAccountListFragment extends BaseAccountListFragme
|
|||
nextMaxID=result.nextPageUri.getQueryParameter("max_id");
|
||||
else
|
||||
nextMaxID=null;
|
||||
if (getActivity() == null) return;
|
||||
onDataLoaded(result.stream().map(AccountItem::new).collect(Collectors.toList()), nextMaxID!=null);
|
||||
}
|
||||
})
|
||||
|
@ -69,7 +68,6 @@ public abstract class PaginatedAccountListFragment extends BaseAccountListFragme
|
|||
remoteAccount.acct += "@" + Uri.parse(remoteAccount.url).getHost();
|
||||
}
|
||||
});
|
||||
if (getActivity() == null) return;
|
||||
onDataLoaded(result.stream().map(AccountItem::new).collect(Collectors.toList()), false);
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue