c487bd2ca6
* fix app.tsx * fix InfoItem * fix helpers * fix webview ref * fix MoreScreen * fix NovelScreenButtonGroup * fix ReaderScreen * fix readerTextAlignSelector * fix ReaderValueChange * fix UpdateNovelCard * fix myAnimeList * fixed legacy backup * fix migrateNovel
59 lines
1.6 KiB
TypeScript
59 lines
1.6 KiB
TypeScript
import 'react-native-url-polyfill/auto';
|
|
import { enableFreeze } from 'react-native-screens';
|
|
|
|
enableFreeze(true);
|
|
|
|
import React from 'react';
|
|
import { StatusBar, StyleSheet } from 'react-native';
|
|
import { GestureHandlerRootView } from 'react-native-gesture-handler';
|
|
import LottieSplashScreen from 'react-native-lottie-splash-screen';
|
|
import { SafeAreaProvider } from 'react-native-safe-area-context';
|
|
import { Provider as PaperProvider } from 'react-native-paper';
|
|
import * as Notifications from 'expo-notifications';
|
|
|
|
import { createTables } from '@database/db';
|
|
import AppErrorBoundary from '@components/AppErrorBoundary/AppErrorBoundary';
|
|
|
|
import Main from './src/navigators/Main';
|
|
import { BottomSheetModalProvider } from '@gorhom/bottom-sheet';
|
|
|
|
Notifications.setNotificationHandler({
|
|
handleNotification: async () => {
|
|
return {
|
|
shouldShowAlert: true,
|
|
shouldPlaySound: true,
|
|
shouldSetBadge: true,
|
|
shouldShowBanner: true,
|
|
shouldShowList: true,
|
|
};
|
|
},
|
|
});
|
|
|
|
createTables();
|
|
LottieSplashScreen.hide();
|
|
|
|
const App = () => {
|
|
return (
|
|
<GestureHandlerRootView style={styles.flex}>
|
|
<AppErrorBoundary>
|
|
<SafeAreaProvider>
|
|
<PaperProvider>
|
|
<BottomSheetModalProvider>
|
|
<StatusBar translucent={true} backgroundColor="transparent" />
|
|
<Main />
|
|
</BottomSheetModalProvider>
|
|
</PaperProvider>
|
|
</SafeAreaProvider>
|
|
</AppErrorBoundary>
|
|
</GestureHandlerRootView>
|
|
);
|
|
};
|
|
|
|
export default App;
|
|
|
|
const styles = StyleSheet.create({
|
|
flex: {
|
|
flex: 1,
|
|
},
|
|
});
|