mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
Minor fixes according to DeepScan
GitHub actions'a Mac is without connectivity again..
This commit is contained in:
parent
e1e4aace78
commit
4afdaf84c1
14
src/App.tsx
14
src/App.tsx
@ -40,17 +40,15 @@ const App: React.FC = () => {
|
|||||||
log('log', 'App', 'rendering App')
|
log('log', 'App', 'rendering App')
|
||||||
const [localCorrupt, setLocalCorrupt] = useState<string>()
|
const [localCorrupt, setLocalCorrupt] = useState<string>()
|
||||||
|
|
||||||
|
const appStateEffect = useCallback(() => {
|
||||||
|
Notifications.setBadgeCountAsync(0)
|
||||||
|
Notifications.dismissAllNotificationsAsync()
|
||||||
|
}, [])
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
AppState.addEventListener('change', () => {
|
AppState.addEventListener('change', appStateEffect)
|
||||||
Notifications.setBadgeCountAsync(0)
|
|
||||||
Notifications.dismissAllNotificationsAsync()
|
|
||||||
})
|
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
AppState.removeEventListener('change', () => {
|
AppState.removeEventListener('change', appStateEffect)
|
||||||
Notifications.setBadgeCountAsync(0)
|
|
||||||
Notifications.dismissAllNotificationsAsync()
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
|
@ -30,9 +30,9 @@ const ScreenMeSettingsPush: React.FC = () => {
|
|||||||
}
|
}
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
checkPush()
|
checkPush()
|
||||||
AppState.addEventListener('change', () => checkPush())
|
AppState.addEventListener('change', checkPush)
|
||||||
return () => {
|
return () => {
|
||||||
AppState.removeEventListener('change', () => checkPush())
|
AppState.removeEventListener('change', checkPush)
|
||||||
}
|
}
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ const AccountInformationStats: React.FC<Props> = ({ account, myInfo }) => {
|
|||||||
<Text
|
<Text
|
||||||
style={[styles.stat, { color: theme.primary }]}
|
style={[styles.stat, { color: theme.primary }]}
|
||||||
children={t('content.summary.statuses_count', {
|
children={t('content.summary.statuses_count', {
|
||||||
count: account?.statuses_count || 0
|
count: account.statuses_count || 0
|
||||||
})}
|
})}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
analytics('account_stats_toots_press', {
|
analytics('account_stats_toots_press', {
|
||||||
@ -48,7 +48,7 @@ const AccountInformationStats: React.FC<Props> = ({ account, myInfo }) => {
|
|||||||
<Text
|
<Text
|
||||||
style={[styles.stat, { color: theme.primary, textAlign: 'right' }]}
|
style={[styles.stat, { color: theme.primary, textAlign: 'right' }]}
|
||||||
children={t('content.summary.following_count', {
|
children={t('content.summary.following_count', {
|
||||||
count: account?.following_count || 0
|
count: account.following_count || 0
|
||||||
})}
|
})}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
analytics('account_stats_following_press', {
|
analytics('account_stats_following_press', {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user