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

@ -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)