From f6a0e634d78eb97d1d877033bf620ea982038731 Mon Sep 17 00:00:00 2001
From: Paul Frazee <pfrazee@gmail.com>
Date: Mon, 2 Jan 2023 17:38:13 -0600
Subject: Implement logging system

---
 src/view/com/post-thread/PostThread.tsx | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

(limited to 'src/view/com/post-thread/PostThread.tsx')

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)
-- 
cgit 1.4.1

