public async Task ReloadPostList() { var store = new StoreToFiles(); var client = new My2chClient(); try { var tmpThread = await store.AddOrUpdateThreadInformation(Thread); var posts = await client.GetFullPostList(tmpThread); posts = await store.AddPosts(posts, tmpThread); tmpThread.Posts = posts; Thread = tmpThread; await Task.Delay(300); ScrollToCurrentOffset(); } catch (Exception ex) { var dialog = new MessageDialog(ex.Message, "スレッドの取得中にエラーが発生しました。"); await dialog.ShowAsync(); } }
public async Task Refresh() { var client = new My2chClient(); try { var newPosts = await client.GetFullPostList(thread); var store = new StoreToFiles(); var posts = await store.AddPosts(newPosts, thread); } catch (Exception ex) { var dialog = new MessageDialog(ex.Message, "スレッドの取得中にエラーが発生しました。"); await dialog.ShowAsync(); } }