private void ItemSelectedAction(NotificationModel item)
        {
            if (ItemInvoked)
            {
                return;
            }

            ItemInvoked = true;

            if (item.AreaGUID != NotificationsViewController.DefaultAreaName)
            {
                ActionHandlerService.SwitchAreaIfNeeded(item.AreaGUID);
            }

            var notificationActionHandler = new ActionHandlerService();

            notificationActionHandler.HandleActionAsync(item.Action);
        }
예제 #2
0
        //public async override Task Refresh()
        //{
        //    if (Platform.IsInternetConnectionAvailable() == false)
        //    {
        //        return;
        //    }
        //    await base.Refresh();
        //    await RefreshFeed();
        //    await RefreshProfile();
        //}


        public void OnFeedItemSelected(FeedItemModel model)
        {
            //HideAreaCollection();

            if (_didFeedActionInvoked)
            {
                return;
            }

            if (!_didFeedActionInvoked)
            {
                _didFeedActionInvoked = true;
                if ((model?.BaseContent as FeedContentImageModel)?.TapAction != null)
                {
                    ActionHandlerService service = new ActionHandlerService();
                    service.HandleActionAsync((model.BaseContent as FeedContentImageModel).TapAction, model.ActionType);
                    _didFeedActionInvoked = false;
                    return;
                }

                if (model?.BaseContent?.TapAction != null)
                {
                    ActionHandlerService service = new ActionHandlerService();
                    service.HandleActionAsync(model.BaseContent.TapAction, model.ActionType);
                    _didFeedActionInvoked = false;
                    return;
                }

                if (model?.ActionDictionary != null && model.ActionDictionary.Keys.Contains("View It"))
                {
                    var    viewItAction = model.ActionDictionary["View It"];
                    string url          = viewItAction.ActionParamDict["FeedURL"];
                    RefreshFeedByUrl(url);
                    _didFeedActionInvoked = false;
                }
                _didFeedActionInvoked = false;
            }
        }