async Task ExecuteLoadItemsCommandHttp(bool update) { if (IsBusy) { return; } IsBusy = true; if (Repos.Count == 0) { var databaseObjects = await DataSQLite.GetItemsAsync(); if (databaseObjects != null && databaseObjects.Any()) { Repos.ReplaceRange(databaseObjects); } } if (!await NetworkAvailable()) { IsBusy = false; return; } try { var repos = await DataGit.GetItemsAsync(Repos.Count > 0); if (repos != null && repos.Any()) { await DataSQLite.SaveListAsync(repos); Repos.ReplaceRange(repos); } } catch (Exception ex) { Debug.WriteLine(ex); MessagingCenter.Send(new MessagingCenterAlert { Title = "Error", Message = "Unable to load items.", Cancel = "OK" }, "message"); } finally { IsBusy = false; } }