private void ItemsLVRefreshRequested(object sender, EventArgs e) { try { RecentFollowersVM.RunLoadMore(true); } catch { } }
private async void DismissUserClick(object sender, RoutedEventArgs e) { try { if (sender is AppBarButton btn && btn.DataContext is InstaSuggestionItem item && item != null) { await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, async() => { RecentFollowersVM.RemoveItemFromSuggestions(item.User.Pk); var result = await Helper.InstaApi.DiscoverProcessor.DismissUserSuggestionAsync(item.User.Pk.ToString()); }); } } catch { } }
private void RecentFollowersViewLoaded(object sender, RoutedEventArgs e) { try { RefreshControl.RefreshRequested -= RefreshControlRefreshRequested; RefreshControl.Visualizer.RefreshStateChanged -= RefreshControlRefreshStateChanged; } catch { } RefreshControl.RefreshRequested += RefreshControlRefreshRequested; if (RefreshControl.Visualizer != null) { RefreshControl.Visualizer.RefreshStateChanged += RefreshControlRefreshStateChanged; } if (!IsLoadedBefore) { IsLoadedBefore = true; RecentFollowersVM.RunLoadMore(true); } }
private void RefreshControlRefreshRequested(Microsoft.UI.Xaml.Controls.RefreshContainer sender, Microsoft.UI.Xaml.Controls.RefreshRequestedEventArgs args) { using (var RefreshCompletionDeferral = args.GetDeferral()) RecentFollowersVM.RunLoadMore(true); }