public async Task Refresh() { IsLoading = true; try { ForumGroupList = new ObservableCollection <ForumCategoryEntity>(); await _db.RemoveMainForumsList(); var forumCategoryEntities = await _forumManager.GetForumCategoryMainPage(); foreach (var forumCategoryEntity in forumCategoryEntities) { ForumGroupList.Add(forumCategoryEntity); } await _db.SaveMainForumsList(ForumGroupList.ToList()); } catch (Exception) { // TODO: There is an "error" saving the main forums page the first time, but they do get saved correctly. // And the exception is not helpful at all... Figure out what's going on and fix it. :\ //AwfulDebugger.SendMessageDialogAsync("Error getting the main forums dialog", ex); } IsLoading = false; OnPropertyChanged("ForumGroupList"); }
private async void Initialize() { IsLoading = true; ForumGroupList = await _forumManager.GetForumCategoryMainPage(); GetFavoriteForums(); IsLoading = false; }
public async void Initialize() { IsLoading = true; try { ForumGroupList = await _forumManager.GetForumCategoryMainPage(); } catch (Exception ex) { AwfulDebugger.SendMessageDialogAsync("Failed to initialize the main forums list.", ex); IsLoading = false; return; } GetFavoriteForums(); IsLoading = false; }
public async Task Initialize() { IsLoading = true; try { _searchManager = new SearchManager(); var forumCategoryEntities = await _forumManager.GetForumCategoryMainPage(); foreach (var forumCategoryEntity in forumCategoryEntities) { ForumGroupList.Add(forumCategoryEntity); } } catch (Exception ex) { AwfulDebugger.SendMessageDialogAsync("Failed to get forums list", ex); } IsLoading = false; }