brminnick/GitTrends

Repositories stats text sometimes don't show if their value is 0

Closed this issue · 2 comments

Describe the bug
When looking at my list of repos I noticed that some repos clones or unique clones stats only show the icon and not the text label, looking further into the issue I noticed it's because they have 0 in those stats atm.

To Reproduce
Steps to reproduce the behavior:

  1. Open App
  2. Connect Account
  3. Search for a Repo that has 0 clones or unique clones in the last month.

Screenshot
Screenshot_20200326-210400

Expected behavior
The text label should display 0, instead of disappearing.

Desktop (please complete the following information):

  • OS: macOS Mojave
  • IDE: Visual Studio Mac v8.4.4(build 91) Community

Smartphone (please complete the following information):

  • Device: Google Pixel 2XL
  • OS: Android 10
  • Version: API 29

Additional context
App Version: v0.12.0

Will be fixing this issue in my upcoming PR's related to #42 .

On it!

In Repository.cs, if IEnumerable<DailyViewsModel>? views and IEnumerable<DailyClonesModel>? clones = null are not null, we need to ensure there are no missing days.

I already have the logic written in TrendsViewModel.cs here.

I'll move void AddMissingDates to `Repository.cs.