Implement logging system
This commit is contained in:
parent
99cec71ed7
commit
f6a0e634d7
39 changed files with 442 additions and 125 deletions
|
@ -40,10 +40,8 @@ export const Profile = observer(({navIdx, visible, params}: ScreenParams) => {
|
|||
return
|
||||
}
|
||||
if (hasSetup) {
|
||||
console.log('Updating profile for', params.name)
|
||||
uiState.update()
|
||||
} else {
|
||||
console.log('Fetching profile for', params.name)
|
||||
store.nav.setTitle(navIdx, params.name)
|
||||
uiState.setup().then(() => {
|
||||
if (aborted) return
|
||||
|
@ -64,12 +62,19 @@ export const Profile = observer(({navIdx, visible, params}: ScreenParams) => {
|
|||
const onRefresh = () => {
|
||||
uiState
|
||||
.refresh()
|
||||
.catch((err: any) => console.error('Failed to refresh', err))
|
||||
.catch((err: any) =>
|
||||
store.log.error('Failed to refresh user profile', err.toString()),
|
||||
)
|
||||
}
|
||||
const onEndReached = () => {
|
||||
uiState
|
||||
.loadMore()
|
||||
.catch((err: any) => console.error('Failed to load more', err))
|
||||
.catch((err: any) =>
|
||||
store.log.error(
|
||||
'Failed to load more entries in user profile',
|
||||
err.toString(),
|
||||
),
|
||||
)
|
||||
}
|
||||
const onPressTryAgain = () => {
|
||||
uiState.setup()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue