private void Pin(bool lastpost)
        {
            var topic = ForumTopicLightEntry.FromTopicEntry(Data);

            topic.Lastpost = lastpost;
            if (ViewModelLocator.ForumsBoard.PrevArgs.Scope != null)
            {
                topic.SourceBoard = ViewModelLocator.ForumsBoard.PrevArgs.Scope.Value;
            }
            else
            {
                topic.SourceBoard = ViewModelLocator.ForumsBoard.PrevArgs.TargetBoard;
            }
            ViewModelLocator.ForumsMain.PinnedTopics.Add(topic);
        }
        private void GotoPinnedTopic(ForumTopicLightEntry topic)
        {
            if (CurrentBackNavRegistrar == null)
            {
                ViewModelLocator.NavMgr.ResetMainBackNav();
                ViewModelLocator.NavMgr.RegisterBackNav(PageIndex.PageForumIndex, new ForumsNavigationArgs());
                if (topic.SourceBoard != null)
                {
                    ViewModelLocator.NavMgr.RegisterBackNav(PageIndex.PageForumIndex, new ForumsBoardNavigationArgs(topic.SourceBoard.Value));
                }
            }
            else
            {
                CurrentBackNavRegistrar.RegisterSelfBackNav();
            }

            ViewModelLocator.GeneralMain.Navigate(PageIndex.PageForumIndex, new ForumsTopicNavigationArgs(topic.Id, topic.Lastpost ? (int?)-1 : null, 1));
        }
        private View GetTemplateDelegate(int i, ForumTopicLightEntry entry, View arg3)
        {
            var view = arg3;

            if (view == null)
            {
                view        = MainActivity.CurrentContext.LayoutInflater.Inflate(Resource.Layout.ForumsPinnedPostItem, null);
                view.Click += ViewOnClick;
                view.FindViewById(Resource.Id.ForumsPinnedPostItemUnpinButton).Click += UnpinButtonOnClick;
            }

            view.Tag = entry.Wrap();

            view.FindViewById <TextView>(Resource.Id.ForumsPinnedPostItemTitle).Text  = entry.Title;
            view.FindViewById <TextView>(Resource.Id.ForumsPinnedPostItemDate).Text   = entry.Created;
            view.FindViewById <TextView>(Resource.Id.ForumsPinnedPostItemAuthor).Text = entry.Op;

            view.FindViewById(Resource.Id.ForumsPinnedPostItemUnpinButton).Tag = entry.Wrap();

            return(view);
        }