//private void PushClient_MessageReceived(object sender, InstagramApiSharp.API.Push.MessageReceivedEventArgs e) //{ // System.Diagnostics.Debug.WriteLine(e?.Json); // Helpers.PushHelper.HandleNotify(e.NotificationContent, Helper.InstaApiList); // //Helpers.NotificationHelper.ShowToast(e.NotificationContent.Message, e.NotificationContent.OptionalAvatarUrl, e.NotificationContent.Title ?? ""); //} public async void TryToRefresh(bool all = false) { if (all) { await UserHelper.GetBanyanAsync(); UserHelper.GetSelfUser(); } MainVM.FirstRun(true); }
private void OnKeyDownHandler(object sender, KeyRoutedEventArgs e) { try { if (e.Key == Windows.System.VirtualKey.F5) { MainVM.FirstRun(true); } } catch { } }
protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); KeyDown += OnKeyDownHandler; if (e.NavigationMode == NavigationMode.New || e.NavigationMode == NavigationMode.Refresh) { if (Helper.UserChanged) { try { MainVM.Stories.Clear(); MainVM.PostsGenerator.Items.Clear(); if (Helpers.NavigationService.Frame.BackStack.Count > 0) { Helpers.NavigationService.Frame.BackStack.Clear(); } Helper.UserChanged = false; MainPage.Current?.HideBackButton(); MainVM.FirstRun(true); } catch { } } } try { try { if (Helpers.NavigationService.Frame.BackStack.Count > 0) { Helpers.NavigationService.Frame.BackStack.Clear(); } } catch { } if (MediaMainUc == null) { return; } ConnectedAnimation userPictureUserDetailsView = ConnectedAnimationService.GetForCurrentView().GetAnimation("UserPictureUserDetailsView"); if (userPictureUserDetailsView != null) { userPictureUserDetailsView.Completed += ImageAnimationClose_Completed; //if (LatestGrid?.Name != InfoGrid.Name) // LatestGrid.Background = new SolidColorBrush(Helper.GetColorFromHex("#FF2E2E2E")); userPictureUserDetailsView.TryStart(MediaMainUc.UserImage); //GridShadow.Visibility = GVSHOW.Visibility = Visibility.Collapsed; } } catch { } //SetSeens(); }
public async void TryToRefresh(bool all = false) { if (all) { if (Helper.CurrentUser != null) { await UserHelper.GetBanyanAsync().ConfigureAwait(false); } else { await UserHelper.GetBanyanAsync(); } UserHelper.GetSelfUser(); } MainVM.FirstRun(true); }
private void RefreshControlRefreshRequested(Microsoft.UI.Xaml.Controls.RefreshContainer sender, Microsoft.UI.Xaml.Controls.RefreshRequestedEventArgs args) { using (var RefreshCompletionDeferral = args.GetDeferral()) MainVM.FirstRun(true); }