Skip to content

Commit

Permalink
Allow hero refresh to work if hero list is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
dukemiller committed Mar 9, 2017
1 parent 64bf012 commit b2b8e9b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hots-quick-build-finder/ViewModels/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ private async Task UpdateHerolist()

private async void Update()
{
if ((DateTime.Now - _settingsRepo.LastUpdated).TotalDays >= 3)
// Manual updates only work if there is no existing hero list or it's been three days since the last check
if (_settingsRepo.Heroes.Count == 0 || (DateTime.Now - _settingsRepo.LastUpdated).TotalDays >= 3)
await UpdateHerolist();
}

Expand Down

0 comments on commit b2b8e9b

Please sign in to comment.