1
0
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:
Zhiyuan Zheng
2022-06-03 21:25:20 +02:00
parent 9b109ba1bb
commit 31a3e87963
11 changed files with 166 additions and 147 deletions

View File

@ -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')