protected async override void OnNavigatedTo(NavigationEventArgs e) { if (e.NavigationMode == NavigationMode.New) { MentionList.Clear(); page = 1; await getList(); } }
/// <summary> /// Updates the mention, trend or SIR lists according to the message type. /// </summary> /// <param name="message"></param> private void UpdateLists(Message message) { // Update the relevant lists switch (message.MessageType) { case "E": URLList.Clear(); foreach (var item in processor.QuarantinedLinks) { URLList.Add("Link: " + item.Key.ToString() + "\nCount: " + item.Value.ToString()); } Email email = (Email)message; if (email.EmailType == "SIR") { SIRList.Clear(); SIR sir = (SIR)email; // Loop through SIRList and Add new instances foreach (var item in processor.SirList) { SIRList.Add("Sort Code: " + item.Key.ToString() + "\nCount: " + item.Value.ToString()); } } break; case "T": MentionList.Clear(); TrendList.Clear(); foreach (var item in processor.MentionsList) { MentionList.Add("Mention: " + item.Key.ToString() + "\nCount: " + item.Value.ToString()); } foreach (var item in processor.TrendingList) { TrendList.Add("Trend: " + item.Key.ToString() + "\nCount : " + item.Value.ToString()); } break; default: break; } }