private async Task RefreshItems(bool Confirm) { try { int MsgBoxResult = 1; if (Confirm) { MsgBoxResult = await new MessagePopup().OpenPopup("Refresh news items", "Do you want to refresh all the news items and scroll to the top?", "Refresh news items", "", "", "", "", true); } if (MsgBoxResult == 1) { //Reset the online status OnlineUpdateFeeds = true; OnlineUpdateNews = true; ApiMessageError = string.Empty; //Load all the items await LoadItems(true, false); } else if (!List_NewsItems.Any() && !(bool)AppVariables.ApplicationSettings["DisplayReadMarkedItems"]) { Feeds TempFeed = new Feeds(); TempFeed.feed_id = "1"; //Change the selection feed ChangeSelectionFeed(TempFeed, false); //Load all the items await LoadItems(false, true); } } catch { } }
private async Task RefreshItems(bool Confirm) { try { string messageResult = string.Empty; if (Confirm) { List <string> messageAnswers = new List <string>(); messageAnswers.Add("Refresh news items"); messageAnswers.Add("Cancel"); messageResult = await MessagePopup.Popup("Refresh news items", "Do you want to refresh all the news items and scroll to the top?", messageAnswers); } if (messageResult == "Refresh news items") { //Reset the online status OnlineUpdateFeeds = true; OnlineUpdateNews = true; ApiMessageError = string.Empty; //Load all the items await LoadItems(true, false); } else if (!List_NewsItems.Any() && !(bool)AppSettingLoad("DisplayReadMarkedItems")) { Feeds TempFeed = new Feeds(); TempFeed.feed_id = "1"; //Change the selection feed ChangeSelectionFeed(TempFeed, false); //Load all the items await LoadItems(false, true); } } catch { } }