Ejemplo n.º 1
0
 static void PushClientMessageReceived(object sender, PushReceivedEventArgs e)
 {
     //if (MainView.Current != null)
     //    if (MainView.Current.DebugText != null)
     //        MainView.Current.DebugText.Text += "NOTIFY RECEIVED :>   " + JsonConvert.SerializeObject(e) + Environment.NewLine;
     System.Diagnostics.Debug.WriteLine(e?.Json);
     if (NavigationService.IsDirect())
     {
         try
         {
             if (sender is IInstaApi api && Helper.CurrentUser.Pk == api.GetLoggedUser().LoggedInUser.Pk)
             {
                 if (!e.CollapseKey.Contains("direct"))
                 {
                     PushHelper.HandleNotify(e.NotificationContent, Helper.InstaApiList);
                 }
             }
             else
             {
                 PushHelper.HandleNotify(e.NotificationContent, Helper.InstaApiList);
             }
         }
Ejemplo n.º 2
0
 static void PushClientMessageReceived(object sender, PushReceivedEventArgs e)
 {
     System.Diagnostics.Debug.WriteLine(e?.Json);
     if (e != null)
     {
         System.Diagnostics.Debug.WriteLine(JsonConvert.SerializeObject(ToPn2(e.NotificationContent)));
     }
     if (NavigationService.IsDirect())
     {
         try
         {
             if (sender is IInstaApi api && Helper.CurrentUser.Pk == api.GetLoggedUser().LoggedInUser.Pk)
             {
                 if (!e.CollapseKey.Contains("direct"))
                 {
                     PushHelper.HandleNotify(e.NotificationContent, Helper.InstaApiList);
                 }
             }
             else
             {
                 PushHelper.HandleNotify(e.NotificationContent, Helper.InstaApiList);
             }
         }