Example #1
0
        /// <summary>
        /// Try to show the detail view
        /// </summary>
        /// <param name="postId"></param>
        private void TryShowPost(Guid postId)
        {
            // If application is active don't show the screen
            if (UIApplication.SharedApplication.ApplicationState == UIApplicationState.Active)
            {
                return;
            }

            // If app is coming from the background and the viisble view is the post detail don't show
            if (MainWindow.RootViewController.VisibleViewController().IsDetailsViewController(postId))
            {
                return;
            }

            MvxPresentationHint presentationHint = new DetailHint {
                PostId = postId
            };

            Mvx.Resolve <IMvxViewDispatcher>().ChangePresentation(presentationHint);
        }
Example #2
0
        private static void ProcessBisnerNotification(Guid relatedItemId, NSString typeId, bool fromFinishedLaunching)
        {
            MvxPresentationHint presentationHint = null;

            switch (typeId)
            {
            //case NotificationTypes.WhitelabelContactAccepted:
            //    break;
            //case NotificationTypes.WhitelabelContactInvite:
            //    break;
            //case NotificationTypes.WhitelabelContactRejected:
            //    break;
            //case NotificationTypes.WhitelabelGroupUserJoin:
            //    break;
            //case NotificationTypes.WhitelabelCompanyPendingUser:
            //    break;
            //case NotificationTypes.WhitelabelNewSuggestion:
            //    break;
            case NotificationTypes.FeedMention:
                App.PostId       = relatedItemId;
                presentationHint = new DetailHint {
                    PostId = relatedItemId
                };
                break;

            case NotificationTypes.FeedComment:
                App.PostId       = relatedItemId;
                presentationHint = new DetailHint {
                    PostId = relatedItemId
                };
                break;

            case NotificationTypes.WhitelabelEventUserInvite:
                App.EventId      = relatedItemId;
                presentationHint = new EventHint {
                    EventId = relatedItemId
                };
                break;

            case NotificationTypes.WhitelabelEventPublished:
                App.EventId      = relatedItemId;
                presentationHint = new EventHint {
                    EventId = relatedItemId
                };
                break;

            case NotificationTypes.FeedGroupPost:
                App.GroupId      = relatedItemId;
                presentationHint = new GroupHint {
                    GroupId = relatedItemId
                };
                break;

            default:
                return;
            }

            if (!fromFinishedLaunching)
            {
                App.ConversationId = null;
                App.EventId        = null;
                App.GroupId        = null;
                App.PostId         = null;

                TryShowScreen(presentationHint);
            }
        }