diff --git a/android/gradle.properties b/android/gradle.properties index 005807b4..952ab614 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -35,7 +35,7 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 # your application. You should enable this flag either if you want # to write custom TurboModules/Fabric components OR use libraries that # are providing them. -newArchEnabled=false +newArchEnabled=true # Use this property to enable or disable the Hermes JS engine. # If set to false, you will be using JSC instead. diff --git a/src/components/playlists/View.tsx b/src/components/playlists/View.tsx index df96ce78..156dc29a 100644 --- a/src/components/playlists/View.tsx +++ b/src/components/playlists/View.tsx @@ -1,9 +1,8 @@ /* eslint-disable react-hooks/exhaustive-deps */ -import React, { useEffect } from 'react'; +import React, { useEffect, useState } from 'react'; import { IconButton, Divider, Text, TouchableRipple } from 'react-native-paper'; import { View, ImageBackground, StyleSheet, Linking } from 'react-native'; import { useTranslation } from 'react-i18next'; -import { DrawerContentComponentProps } from '@react-navigation/drawer'; import { useNoxSetting } from '@stores/useApp'; import usePlaybackAA from '@hooks/usePlaybackAA'; @@ -56,8 +55,9 @@ const BiliCard = (props: any) => { return <>{props.children}; }; -export default (props: DrawerContentComponentProps) => { +export default () => { const navigation = useNavigation(); + const [layoutHeight, setLayoutHeight] = useState(0); const playlistIds = useNoxSetting(state => state.playlistIds); const playerStyle = useNoxSetting(state => state.playerStyle); @@ -86,7 +86,12 @@ export default (props: DrawerContentComponentProps) => { }, []); return ( - + + layoutHeight === 0 && setLayoutHeight(e.nativeEvent.layout.height) + } + >