public void LocalRefresh() { AllLeagues.Clear(); DataManager.Instance.Leagues.Values.OrderBy(l => l.Name).ToList().ForEach(l => AllLeagues.Add(new LeagueViewModel { LeagueId = l.Id })); }
async public Task GetAllLeagues(bool forceRefresh = false) { if (_hasLoadedBefore && !forceRefresh) { return; } using (new Busy(this)) { AllLeagues.Clear(); await RunSafe(AzureService.Instance.GetAllLeagues()); _hasLoadedBefore = true; LocalRefresh(); } }