fix bugs since 2.1.0 release

This commit is contained in:
M M Arif 2019-10-02 22:24:02 +05:00
parent 8b26355fc0
commit f19327431f
7 changed files with 24 additions and 17 deletions

View File

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

View File

@ -237,6 +237,7 @@ public class MilestonesAdapter extends RecyclerView.Adapter<MilestonesAdapter.Mi
if (currentItem.getOpen_issues() == 0) { if (currentItem.getOpen_issues() == 0) {
holder.msProgress.setProgress(100); holder.msProgress.setProgress(100);
holder.msProgress.setOnClickListener(new ClickListener(mCtx.getResources().getString(R.string.milestoneCompletion, 100), mCtx));
} }
else { else {
int msCompletion = 100 * currentItem.getClosed_issues() / (currentItem.getOpen_issues() + currentItem.getClosed_issues()); int msCompletion = 100 * currentItem.getClosed_issues() / (currentItem.getOpen_issues() + currentItem.getClosed_issues());

View File

@ -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);
} }

View File

@ -247,12 +247,7 @@ public class RepoInfoFragment extends Fragment {
repoRepoUrlInfo.setText(repoInfo.getHtml_url()); repoRepoUrlInfo.setText(repoInfo.getHtml_url());
repoForksCountInfo.setText(repoInfo.getForks_count()); repoForksCountInfo.setText(repoInfo.getForks_count());
if(repoInfo.getHas_issues()) { tinyDb.putBoolean("hasIssues", repoInfo.getHas_issues());
tinyDb.putBoolean("hasIssues", repoInfo.getHas_issues());
}
else {
tinyDb.putBoolean("hasIssues", true);
}
switch (timeFormat) { switch (timeFormat) {
case "pretty": { case "pretty": {

View File

@ -4,8 +4,8 @@
<item <item
android:id="@android:id/background" android:id="@android:id/background"
android:top="4dp" android:top="2dp"
android:bottom="4dp" android:bottom="2dp"
android:right="1dp" android:right="1dp"
android:left="1dp"> android:left="1dp">
<shape> <shape>
@ -16,12 +16,12 @@
<item <item
android:id="@android:id/progress" android:id="@android:id/progress"
android:top="1dp" android:top="3dp"
android:bottom="1dp" android:bottom="3dp"
android:left="1dp" android:left="1dp"
android:right="1dp"> android:right="1dp">
<scale android:scaleWidth="100%" android:scaleHeight="80%"> <scale android:scaleWidth="100%">
<shape> <shape>
<corners android:radius="15dp" /> <corners android:radius="15dp" />
</shape> </shape>

View File

@ -67,7 +67,7 @@
style="@style/Widget.AppCompat.ProgressBar.Horizontal" style="@style/Widget.AppCompat.ProgressBar.Horizontal"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="82" android:layout_weight="80"
android:progress="50" android:progress="50"
android:layout_marginTop="2dp" android:layout_marginTop="2dp"
android:progressDrawable="@drawable/progress_bar" android:progressDrawable="@drawable/progress_bar"

View File

@ -0,0 +1,6 @@
Bugfix: crash when repo avatar in not present in api nodes. old Gitea instances
Bugfix: Milestone progress bar fix
Bugfix: Create new issue enable/disable fix
For more, check the release notes.
https://gitea.com/mmarif/GitNex/releases