public async Task PreviewPost()
        {
            IsLoading = true;
            if (string.IsNullOrEmpty(ReplyBox.Text) || _forumReply == null)
            {
                return;
            }
            _forumReply.Message     = ReplyBox.Text;
            PreviewViewModel.IsOpen = true;
            var result = Selected.IsEdit
                ? await _replyManager.CreatePreviewEditPostAsync(_forumReply)
                : await _replyManager.CreatePreviewPostAsync(_forumReply);

            PreviewViewModel.LoadPost(result);
            IsLoading = false;
        }
예제 #2
0
        public async Task PreviewThread()
        {
            IsLoading = true;
            if (string.IsNullOrEmpty(ReplyBox.Text) || _newThread == null)
            {
                return;
            }
            _newThread.Content      = ReplyBox.Text;
            _newThread.Subject      = Subject.Text;
            _newThread.PostIcon     = PostIconViewModel.PostIcon;
            _newThread.ForumId      = Selected.ForumId;
            PreviewViewModel.IsOpen = true;
            var result = await _threadManager.CreateNewThreadPreviewAsync(_newThread);

            PreviewViewModel.LoadPost(result);
            IsLoading = false;
        }