fix: own instance accounts not loading
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
package org.joinmastodon.android.fragments.account_list;
|
package org.joinmastodon.android.fragments.account_list;
|
||||||
|
|
||||||
|
import android.net.Uri;
|
||||||
|
|
||||||
import org.joinmastodon.android.GlobalUserPreferences;
|
import org.joinmastodon.android.GlobalUserPreferences;
|
||||||
import org.joinmastodon.android.api.requests.HeaderPaginationRequest;
|
import org.joinmastodon.android.api.requests.HeaderPaginationRequest;
|
||||||
import org.joinmastodon.android.model.Account;
|
import org.joinmastodon.android.model.Account;
|
||||||
@@ -24,7 +26,7 @@ public abstract class PaginatedAccountListFragment extends BaseAccountListFragme
|
|||||||
if(GlobalUserPreferences.loadRemoteAccountFollowers){
|
if(GlobalUserPreferences.loadRemoteAccountFollowers){
|
||||||
if ((this instanceof FollowingListFragment || this instanceof FollowerListFragment) && targetAccount != null){
|
if ((this instanceof FollowingListFragment || this instanceof FollowerListFragment) && targetAccount != null){
|
||||||
UiUtils.lookupRemoteAccount(getContext(), targetAccount, accountID, null, account -> {
|
UiUtils.lookupRemoteAccount(getContext(), targetAccount, accountID, null, account -> {
|
||||||
if(account != null){
|
if(account != null && account.getDomain() != null){
|
||||||
currentRequest=onCreateRemoteRequest(account.id, offset==0 ? null : nextMaxID, count)
|
currentRequest=onCreateRemoteRequest(account.id, offset==0 ? null : nextMaxID, count)
|
||||||
.setCallback(new SimpleCallback<>(this){
|
.setCallback(new SimpleCallback<>(this){
|
||||||
@Override
|
@Override
|
||||||
@@ -35,6 +37,9 @@ public abstract class PaginatedAccountListFragment extends BaseAccountListFragme
|
|||||||
nextMaxID=null;
|
nextMaxID=null;
|
||||||
result.stream().forEach(remoteAccount -> {
|
result.stream().forEach(remoteAccount -> {
|
||||||
remoteAccount.reloadWhenClicked = true;
|
remoteAccount.reloadWhenClicked = true;
|
||||||
|
if (remoteAccount.getDomain() == null) {
|
||||||
|
remoteAccount.acct += "@" + Uri.parse(remoteAccount.url).getHost();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
if (getActivity() == null) return;
|
if (getActivity() == null) return;
|
||||||
onDataLoaded(result.stream().map(AccountItem::new).collect(Collectors.toList()), false);
|
onDataLoaded(result.stream().map(AccountItem::new).collect(Collectors.toList()), false);
|
||||||
|
|||||||
Reference in New Issue
Block a user