private async Task OfflineQuestion(Int32 questionId)
        {
            if (null == _question)
            {
                return;
            }

            var detailTask = _question.GetDetailAsync(LoginUser.Current.Token, questionId, true);

            var relationTask = _question.GetRelationshipAsync(LoginUser.Current.Token, questionId, true);

            await detailTask;
            await relationTask;

            await OfflineQuestionAnswers(questionId);

            await OfflineQuestionComments(questionId);

            lock (_questionsSync)
            {
                QuestionsCount++;
            }
        }
Example #2
0
        private async void GetDetailMethod()
        {
            if (null == _questionService)
            {
                return;
            }

            if (_detailLoaded)
            {
                return;
            }

            Loading = true;

            var result =
                await _questionService.GetDetailAsync(LoginUser.Current.Token, Id, true);

            Loading = false;

            if (result == null)
            {
                return;
            }

            if (null != result.Error)
            {
                ToasteIndicator.Instance.Show(String.Empty, result.Error.Message, null, 3);

                Debug.WriteLine(Regex.Unescape(result.Error.Message));

                return;
            }

            _detailLoaded = true;

            Detail = result.Result;
        }