Implement logging system

This commit is contained in:
Paul Frazee 2023-01-02 17:38:13 -06:00
parent 99cec71ed7
commit f6a0e634d7
39 changed files with 442 additions and 125 deletions

View file

@ -72,12 +72,12 @@ export const PostThreadItem = observer(function PostThreadItem({
const onPressToggleRepost = () => {
item
.toggleRepost()
.catch(e => console.error('Failed to toggle repost', record, e))
.catch(e => store.log.error('Failed to toggle repost', e.toString()))
}
const onPressToggleUpvote = () => {
item
.toggleUpvote()
.catch(e => console.error('Failed to toggle upvote', record, e))
.catch(e => store.log.error('Failed to toggle upvote', e.toString()))
}
const onCopyPostText = () => {
Clipboard.setString(record.text)
@ -90,7 +90,7 @@ export const PostThreadItem = observer(function PostThreadItem({
Toast.show('Post deleted')
},
e => {
console.error(e)
store.log.error('Failed to delete post', e.toString())
Toast.show('Failed to delete post, please try again')
},
)