Ejemplo n.º 1
0
        protected override async Task LoadItems()
        {
            //  Tournaments = null;

            var tournaments = await _service.GetLastAddedTournaments(_cancellationTokenSource.Token, _page);

            Tournaments = tournaments.Select(tournament => new TournamentViewModel(tournament)).ToList();
            _page       = Tournaments.Count / 101;

            _loadMoreHelper.Subscribe(Tournaments.Cast <LoadMoreOnScrollListViewItemViewModel <ITournament> >().ToList());
        }
Ejemplo n.º 2
0
        async Task LoadItems()
        {
            var questions = await _service.SearchQuestions(_searchParams, _cancellationTokenSource.Token);

            CheckIfThereIsMoreDataToLoad(questions.Count, Questions != null ? Questions.Count : 0);
            UpdatePageAccordingToNewdata(questions.Count);

            Questions = questions.Select(t => new LoadMoreOnScrollListViewItemViewModel <ISearchQuestionsResult>()
            {
                Item = t
            }).ToList();

            DisplayErrorIfNoData();
            _loadMoreHelper.Subscribe(Questions);
        }