refactor(follower): move null check in called method

This commit is contained in:
FineFindus 2023-04-16 21:19:24 +02:00
parent e4f4ca5392
commit 4da6016e06
No known key found for this signature in database
GPG Key ID: 64873EE210FF8E6B
2 changed files with 2 additions and 2 deletions

View File

@ -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();
}

View File

@ -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);
}
})