From f51351e80d446fc058faf0ab91757ca4bdead0a5 Mon Sep 17 00:00:00 2001
From: Eric Bailey <git@esb.lol>
Date: Sat, 4 Nov 2023 13:42:36 -0500
Subject: Replace all logs with new logger

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

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

diff --git a/src/view/com/post-thread/PostThreadItem.tsx b/src/view/com/post-thread/PostThreadItem.tsx
index 430269165..351a46706 100644
--- a/src/view/com/post-thread/PostThreadItem.tsx
+++ b/src/view/com/post-thread/PostThreadItem.tsx
@@ -36,6 +36,7 @@ import {TimeElapsed} from 'view/com/util/TimeElapsed'
 import {makeProfileLink} from 'lib/routes/links'
 import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries'
 import {MAX_POST_LINES} from 'lib/constants'
+import {logger} from '#/logger'
 
 export const PostThreadItem = observer(function PostThreadItem({
   item,
@@ -111,14 +112,14 @@ export const PostThreadItem = observer(function PostThreadItem({
   const onPressToggleRepost = React.useCallback(() => {
     return item
       .toggleRepost()
-      .catch(e => store.log.error('Failed to toggle repost', {error: e}))
-  }, [item, store])
+      .catch(e => logger.error('Failed to toggle repost', {error: e}))
+  }, [item])
 
   const onPressToggleLike = React.useCallback(() => {
     return item
       .toggleLike()
-      .catch(e => store.log.error('Failed to toggle like', {error: e}))
-  }, [item, store])
+      .catch(e => logger.error('Failed to toggle like', {error: e}))
+  }, [item])
 
   const onCopyPostText = React.useCallback(() => {
     Clipboard.setString(record?.text || '')
@@ -138,9 +139,9 @@ export const PostThreadItem = observer(function PostThreadItem({
         Toast.show('You will now receive notifications for this thread')
       }
     } catch (e) {
-      store.log.error('Failed to toggle thread mute', {error: e})
+      logger.error('Failed to toggle thread mute', {error: e})
     }
-  }, [item, store])
+  }, [item])
 
   const onDeletePost = React.useCallback(() => {
     item.delete().then(
@@ -149,11 +150,11 @@ export const PostThreadItem = observer(function PostThreadItem({
         Toast.show('Post deleted')
       },
       e => {
-        store.log.error('Failed to delete post', {error: e})
+        logger.error('Failed to delete post', {error: e})
         Toast.show('Failed to delete post, please try again')
       },
     )
-  }, [item, store])
+  }, [item])
 
   const onPressShowMore = React.useCallback(() => {
     setLimitLines(false)
-- 
cgit 1.4.1

