mirror of
https://github.com/tooot-app/app
synced 2025-02-16 20:00:53 +01: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')
|
||||
const [localCorrupt, setLocalCorrupt] = useState<string>()
|
||||
|
||||
const appStateEffect = useCallback(() => {
|
||||
Notifications.setBadgeCountAsync(0)
|
||||
Notifications.dismissAllNotificationsAsync()
|
||||
}, [])
|
||||
useEffect(() => {
|
||||
AppState.addEventListener('change', () => {
|
||||
Notifications.setBadgeCountAsync(0)
|
||||
Notifications.dismissAllNotificationsAsync()
|
||||
})
|
||||
AppState.addEventListener('change', appStateEffect)
|
||||
|
||||
return () => {
|
||||
AppState.removeEventListener('change', () => {
|
||||
Notifications.setBadgeCountAsync(0)
|
||||
Notifications.dismissAllNotificationsAsync()
|
||||
})
|
||||
AppState.removeEventListener('change', appStateEffect)
|
||||
}
|
||||
}, [])
|
||||
|
||||
|
@ -30,9 +30,9 @@ const ScreenMeSettingsPush: React.FC = () => {
|
||||
}
|
||||
useEffect(() => {
|
||||
checkPush()
|
||||
AppState.addEventListener('change', () => checkPush())
|
||||
AppState.addEventListener('change', checkPush)
|
||||
return () => {
|
||||
AppState.removeEventListener('change', () => checkPush())
|
||||
AppState.removeEventListener('change', checkPush)
|
||||
}
|
||||
}, [])
|
||||
|
||||
|
@ -26,7 +26,7 @@ const AccountInformationStats: React.FC<Props> = ({ account, myInfo }) => {
|
||||
<Text
|
||||
style={[styles.stat, { color: theme.primary }]}
|
||||
children={t('content.summary.statuses_count', {
|
||||
count: account?.statuses_count || 0
|
||||
count: account.statuses_count || 0
|
||||
})}
|
||||
onPress={() => {
|
||||
analytics('account_stats_toots_press', {
|
||||
@ -48,7 +48,7 @@ const AccountInformationStats: React.FC<Props> = ({ account, myInfo }) => {
|
||||
<Text
|
||||
style={[styles.stat, { color: theme.primary, textAlign: 'right' }]}
|
||||
children={t('content.summary.following_count', {
|
||||
count: account?.following_count || 0
|
||||
count: account.following_count || 0
|
||||
})}
|
||||
onPress={() => {
|
||||
analytics('account_stats_following_press', {
|
||||
|
Loading…
x
Reference in New Issue
Block a user