mirror of
https://codeberg.org/gitnex/GitNex.git
synced 2024-12-16 15:48:13 +08:00
Fix crash from gplay console, app crash when no avatar url node is present in API. old gitea instances.
This commit is contained in:
parent
b90b3c3320
commit
0bcbca8bdc
@ -2,7 +2,6 @@ package org.mian.gitnex.adapters;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.util.Log;
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
@ -181,9 +181,14 @@ public class ReposListAdapter extends RecyclerView.Adapter<ReposListAdapter.Repo
|
|||||||
.endConfig()
|
.endConfig()
|
||||||
.buildRoundRect(firstCharacter, color, 3);
|
.buildRoundRect(firstCharacter, color, 3);
|
||||||
|
|
||||||
if (!currentItem.getAvatar_url().equals("")) {
|
if (currentItem.getAvatar_url() != null) {
|
||||||
Picasso.get().load(currentItem.getAvatar_url()).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(holder.image);
|
if (!currentItem.getAvatar_url().equals("")) {
|
||||||
} else {
|
Picasso.get().load(currentItem.getAvatar_url()).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(holder.image);
|
||||||
|
} else {
|
||||||
|
holder.image.setImageDrawable(drawable);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
holder.image.setImageDrawable(drawable);
|
holder.image.setImageDrawable(drawable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user