public ViewResult Topics(int page = 1) { var user = _userRetrievalShim.GetUser(HttpContext); if (user == null) { return(View()); } PagerContext pagerContext; var topics = _favoriteTopicService.GetTopics(user, page, out pagerContext); var titles = _forumService.GetAllForumTitles(); var container = new PagedTopicContainer { PagerContext = pagerContext, Topics = topics, ForumTitles = titles }; _lastReadService.GetTopicReadStatus(user, container); return(View(container)); }
public async Task <ViewResult> Topics(int pageNumber = 1) { var user = _userRetrievalShim.GetUser(); if (user == null) { return(View()); } var(topics, pagerContext) = await _favoriteTopicService.GetTopics(user, pageNumber); var titles = _forumService.GetAllForumTitles(); var container = new PagedTopicContainer { PagerContext = pagerContext, Topics = topics, ForumTitles = titles }; await _lastReadService.GetTopicReadStatus(user, container); return(View(container)); }