private void UpdateChaptersInSeries(List <MangaAbstractModel> chaptersList) { ChaptersInSeries.Clear(); foreach (MangaAbstractModel viewModel in chaptersList) { ChaptersInSeries.Add(viewModel); } }
public void ViewSeries(SeriesModel viewModel) { var query = from MangaAbstractModel chapter in _mangaDB.Chapters where chapter.SeriesId == viewModel.SeriesId && chapter.IsRecentChapter == false select chapter; List <MangaAbstractModel> chapters = new List <MangaAbstractModel>(query); if (chapters.Count > 0) { UpdateChaptersInSeries(chapters); IsChaptersInSeriesLoaded = (ChaptersInSeries.Count > 0) && IsCreationTimeFresh(chapters[0].CreationTime, _oneDayRetention); } else { ChaptersInSeries.Clear(); IsChaptersInSeriesLoaded = false; } _currentlyViewingSeries = viewModel; }