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:
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)
|
||||
}
|
||||
}, [])
|
||||
|
||||
|
Reference in New Issue
Block a user