Fix crash from gplay console, app crash when no avatar url node is present in API. old gitea instances.
This commit is contained in:
		@@ -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);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user