mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-12-29 04:17:12 +01:00
Fix bugs related to fetching blocked users
This commit is contained in:
parent
23d41846d0
commit
7877001533
@ -40,7 +40,10 @@ public class FetchBlockedThings {
|
||||
JSONObject blockedUserJson = blockedUsersJson.getJSONObject(i).getJSONObject("target");
|
||||
int id = blockedUserJson.getInt("id");
|
||||
String name = blockedUserJson.getString("name");
|
||||
String avatar = blockedUserJson.getString("avatar");
|
||||
String avatar = "";
|
||||
if (blockedUserJson.has("avatar"))
|
||||
avatar = blockedUserJson.getString("avatar");
|
||||
|
||||
String qualifiedName = LemmyUtils.actorID2FullName(blockedUserJson.getString("actor_id"));
|
||||
BlockedUserData blockedUserData = new BlockedUserData(id, name, avatar, qualifiedName, accountName);
|
||||
|
||||
|
@ -1094,8 +1094,6 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele
|
||||
mUserData = userData;
|
||||
username = userData.getName();
|
||||
setupVisibleElements();
|
||||
new ViewUserDetailActivity.InsertUserDataAsyncTask(mRedditDataRoomDatabase.userDao(), userData,
|
||||
() -> mFetchUserInfoSuccess = true).execute();
|
||||
FetchBlockedThings.fetchBlockedThings(mRetrofit.getRetrofit(), mAccessToken, mAccountQualifiedName, new FetchBlockedThings.FetchBlockedThingsListener() {
|
||||
|
||||
@Override
|
||||
@ -1108,13 +1106,15 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele
|
||||
}
|
||||
}
|
||||
isBlocked = false;
|
||||
invalidateOptionsMenu();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFetchBlockedThingsFailure() {
|
||||
|
||||
}
|
||||
});
|
||||
new ViewUserDetailActivity.InsertUserDataAsyncTask(mRedditDataRoomDatabase.userDao(), userData,
|
||||
() -> mFetchUserInfoSuccess = true).execute();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user