diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-01-02 17:38:13 -0600 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2023-01-02 17:38:13 -0600 |
commit | f6a0e634d78eb97d1d877033bf620ea982038731 (patch) | |
tree | 5d6b7ccbc8f6a587c3910c760bceeefda0c0a291 /src/view/com/post-thread/PostThread.tsx | |
parent | 99cec71ed798b29079eb474acd6f7cc799b51a51 (diff) | |
download | voidsky-f6a0e634d78eb97d1d877033bf620ea982038731.tar.zst |
Implement logging system
Diffstat (limited to 'src/view/com/post-thread/PostThread.tsx')
-rw-r--r-- | src/view/com/post-thread/PostThread.tsx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/view/com/post-thread/PostThread.tsx b/src/view/com/post-thread/PostThread.tsx index 8c22cc8b7..187fe6c11 100644 --- a/src/view/com/post-thread/PostThread.tsx +++ b/src/view/com/post-thread/PostThread.tsx @@ -18,7 +18,14 @@ export const PostThread = observer(function PostThread({ const ref = useRef<FlatList>(null) const posts = view.thread ? Array.from(flattenThread(view.thread)) : [] const onRefresh = () => { - view?.refresh().catch(err => console.error('Failed to refresh', err)) + view + ?.refresh() + .catch(err => + view.rootStore.log.error( + 'Failed to refresh posts thread', + err.toString(), + ), + ) } const onLayout = () => { const index = posts.findIndex(post => post._isHighlightedPost) |