diff --git a/app/src/main/java/org/mian/gitnex/adapters/MilestonesAdapter.java b/app/src/main/java/org/mian/gitnex/adapters/MilestonesAdapter.java index 2aa4e796..c890936c 100644 --- a/app/src/main/java/org/mian/gitnex/adapters/MilestonesAdapter.java +++ b/app/src/main/java/org/mian/gitnex/adapters/MilestonesAdapter.java @@ -9,6 +9,7 @@ import android.view.ViewGroup; import android.widget.Filter; import android.widget.Filterable; import android.widget.ImageView; +import android.widget.ProgressBar; import android.widget.TextView; import com.amulyakhare.textdrawable.TextDrawable; import com.vdurmont.emoji.EmojiParser; @@ -59,6 +60,7 @@ public class MilestonesAdapter extends RecyclerView.Adapter 0) { + if (currentItem.getOpen_issues() == 0) { + holder.msProgress.setProgress(100); + } else { + holder.msProgress.setProgress(100*currentItem.getClosed_issues()/(currentItem.getOpen_issues() + currentItem.getClosed_issues())); + } + } else { + holder.msProgress.setVisibility(View.GONE); + } + if(currentItem.getDue_on() != null) { if (timeFormat.equals("normal") || timeFormat.equals("pretty")) {