improved large album/playlist performance

switched to flatlist for all of those
This commit is contained in:
austinried
2021-08-25 16:13:35 +09:00
parent 81b5bfb56b
commit fac2b62ec2
13 changed files with 210 additions and 140 deletions

View File

@@ -3,14 +3,27 @@ import { useWindowDimensions, ViewStyle } from 'react-native'
import LinearGradient from 'react-native-linear-gradient'
import colorStyles from '@app/styles/colors'
const GradientBackground: React.FC<{
export type GradientBackgroundPropsBase = {
height?: number | string
width?: number | string
position?: 'relative' | 'absolute'
style?: ViewStyle
}
export type GradientBackgroundProps = GradientBackgroundPropsBase & {
colors?: string[]
locations?: number[]
}> = ({ height, width, position, style, colors, locations, children }) => {
}
const GradientBackground: React.FC<GradientBackgroundProps> = ({
height,
width,
position,
style,
colors,
locations,
children,
}) => {
const layout = useWindowDimensions()
return (