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.Intent;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
@ -181,9 +181,14 @@ public class ReposListAdapter extends RecyclerView.Adapter<ReposListAdapter.Repo
|
||||
.endConfig()
|
||||
.buildRoundRect(firstCharacter, color, 3);
|
||||
|
||||
if (!currentItem.getAvatar_url().equals("")) {
|
||||
Picasso.get().load(currentItem.getAvatar_url()).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(holder.image);
|
||||
} else {
|
||||
if (currentItem.getAvatar_url() != null) {
|
||||
if (!currentItem.getAvatar_url().equals("")) {
|
||||
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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user