diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/account_list/PaginatedAccountListFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/account_list/PaginatedAccountListFragment.java index 4c3409426..8e20cfdce 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/account_list/PaginatedAccountListFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/account_list/PaginatedAccountListFragment.java @@ -20,6 +20,8 @@ public abstract class PaginatedAccountListFragment extends BaseAccountListFragme protected Account targetAccount; + protected Account remoteAccount; + public abstract HeaderPaginationRequest onCreateRequest(String maxID, int count); public abstract HeaderPaginationRequest onCreateRemoteRequest(String id, String maxID, int count); @@ -27,13 +29,18 @@ public abstract class PaginatedAccountListFragment extends BaseAccountListFragme @Override protected void doLoadData(int offset, int count){ if (shouldLoadRemote()) { - UiUtils.lookupRemoteAccount(getContext(), targetAccount, accountID, null, account -> { - if(account != null){ - loadRemoteFollower(offset, count, account); - } else { - loadFollower(offset, count); - } - }); + if(remoteAccount == null){ + UiUtils.lookupRemoteAccount(getContext(), targetAccount, accountID, null, account -> { + remoteAccount = account; + if(remoteAccount != null){ + loadRemoteFollower(offset, count, remoteAccount); + } else { + loadFollower(offset, count); + } + }); + } else { + loadRemoteFollower(offset, count, remoteAccount); + } } else { loadFollower(offset, count); }