Fix crashes on my repo, starred repos etc - 2.1.2 release

This commit is contained in:
M M Arif 2019-10-03 21:43:33 +05:00
parent 4904b5899f
commit 07a1fa6aad
5 changed files with 30 additions and 11 deletions

View File

@ -6,8 +6,8 @@ android {
applicationId "org.mian.gitnex"
minSdkVersion 21
targetSdkVersion 28
versionCode 61
versionName "2.1.1"
versionCode 62
versionName "2.1.2"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {

View File

@ -179,9 +179,14 @@ public class MyReposListAdapter extends RecyclerView.Adapter<MyReposListAdapter.
.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.imageMy);
} 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.imageMy);
} else {
holder.imageMy.setImageDrawable(drawable);
}
}
else {
holder.imageMy.setImageDrawable(drawable);
}

View File

@ -180,9 +180,14 @@ public class RepositoriesByOrgAdapter extends RecyclerView.Adapter<RepositoriesB
.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);
}

View File

@ -180,9 +180,14 @@ public class StarredReposListAdapter extends RecyclerView.Adapter<StarredReposLi
.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);
}

View File

@ -0,0 +1,4 @@
Bugfix: crash when my repo, starred repos are accessed without repo avatar. old Gitea instances
For more, check the release notes.
https://gitea.com/mmarif/GitNex/releases