mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
Allow push count badge
This commit is contained in:
15
src/App.tsx
15
src/App.tsx
@ -17,10 +17,9 @@ import {
|
||||
} from '@utils/slices/settingsSlice'
|
||||
import ThemeManager from '@utils/styles/ThemeManager'
|
||||
import 'expo-asset'
|
||||
import * as Notifications from 'expo-notifications'
|
||||
import * as SplashScreen from 'expo-splash-screen'
|
||||
import React, { useCallback, useEffect, useState } from 'react'
|
||||
import { AppState, LogBox, Platform } from 'react-native'
|
||||
import { LogBox, Platform } from 'react-native'
|
||||
import { GestureHandlerRootView } from 'react-native-gesture-handler'
|
||||
import 'react-native-image-keyboard'
|
||||
import { enableFreeze } from 'react-native-screens'
|
||||
@ -44,18 +43,6 @@ const App: React.FC = () => {
|
||||
log('log', 'App', 'rendering App')
|
||||
const [localCorrupt, setLocalCorrupt] = useState<string>()
|
||||
|
||||
const appStateEffect = useCallback(() => {
|
||||
Notifications.setBadgeCountAsync(0)
|
||||
Notifications.dismissAllNotificationsAsync()
|
||||
}, [])
|
||||
useEffect(() => {
|
||||
const appStateListener = AppState.addEventListener('change', appStateEffect)
|
||||
|
||||
return () => {
|
||||
appStateListener.remove()
|
||||
}
|
||||
}, [])
|
||||
|
||||
useEffect(() => {
|
||||
const delaySplash = async () => {
|
||||
log('log', 'App', 'delay splash')
|
||||
|
Reference in New Issue
Block a user