mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-11-14 06:22:50 +01:00
Fix issues related to image loading
Resolved some issues related to loading icons of users on community pages
This commit is contained in:
parent
252e00b67a
commit
1d7031f3d4
@ -476,7 +476,7 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler
|
|||||||
((PostDetailBaseViewHolder) holder).mTitleTextView.setText(mPost.getTitle());
|
((PostDetailBaseViewHolder) holder).mTitleTextView.setText(mPost.getTitle());
|
||||||
if (mPost.getSubredditNamePrefixed().startsWith("u/")) {
|
if (mPost.getSubredditNamePrefixed().startsWith("u/")) {
|
||||||
if (mPost.getAuthorIconUrl() == null) {
|
if (mPost.getAuthorIconUrl() == null) {
|
||||||
LoadUserData.loadUserData(mExecutor, new Handler(), mRedditDataRoomDatabase, LemmyUtils.qualifiedUserName2ActorId(mPost.getAuthorNamePrefixed()), mOauthRetrofit, iconImageUrl -> {
|
LoadUserData.loadUserData(mExecutor, new Handler(), mRedditDataRoomDatabase,mPost.getAuthorNamePrefixed(), mOauthRetrofit, iconImageUrl -> {
|
||||||
if (mActivity != null && getItemCount() > 0) {
|
if (mActivity != null && getItemCount() > 0) {
|
||||||
if (iconImageUrl == null || iconImageUrl.equals("")) {
|
if (iconImageUrl == null || iconImageUrl.equals("")) {
|
||||||
mGlide.load(R.drawable.subreddit_default_icon)
|
mGlide.load(R.drawable.subreddit_default_icon)
|
||||||
|
@ -1757,7 +1757,7 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
|
|||||||
loadIconListener.loadIconSuccess(subredditOrUserName, iconImageUrl);
|
loadIconListener.loadIconSuccess(subredditOrUserName, iconImageUrl);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
LoadUserData.loadUserData(mExecutor, new Handler(), mRedditDataRoomDatabase, LemmyUtils.qualifiedUserName2ActorId(subredditOrUserName),
|
LoadUserData.loadUserData(mExecutor, new Handler(), mRedditDataRoomDatabase, subredditOrUserName,
|
||||||
mRetrofit.getRetrofit(), iconImageUrl -> {
|
mRetrofit.getRetrofit(), iconImageUrl -> {
|
||||||
subredditOrUserIcons.put(subredditOrUserName, iconImageUrl);
|
subredditOrUserIcons.put(subredditOrUserName, iconImageUrl);
|
||||||
loadIconListener.loadIconSuccess(subredditOrUserName, iconImageUrl);
|
loadIconListener.loadIconSuccess(subredditOrUserName, iconImageUrl);
|
||||||
|
Loading…
Reference in New Issue
Block a user