chore: Upgrade to latest react-native
This commit is contained in:
@@ -47,7 +47,6 @@ export default function App(): JSX.Element {
|
||||
Capability.Stop,
|
||||
Capability.SeekTo,
|
||||
],
|
||||
stopWithApp: true
|
||||
});
|
||||
}
|
||||
setupTrackPlayer();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { BlurView, BlurViewProperties } from '@react-native-community/blur';
|
||||
import { BlurView, BlurViewProps } from '@react-native-community/blur';
|
||||
import { THEME_COLOR } from 'CONSTANTS';
|
||||
import React, { PropsWithChildren } from 'react';
|
||||
import { useContext } from 'react';
|
||||
@@ -97,7 +97,7 @@ export function DefaultStylesProvider(props: DefaultStylesProviderProps) {
|
||||
return props.children(defaultStyles);
|
||||
}
|
||||
|
||||
export function ColoredBlurView(props: PropsWithChildren<BlurViewProperties>) {
|
||||
export function ColoredBlurView(props: PropsWithChildren<BlurViewProps>) {
|
||||
const scheme = useColorScheme();
|
||||
|
||||
return Platform.OS === 'ios' ? (
|
||||
|
||||
@@ -58,7 +58,6 @@ function DownloadIcon({ trackId, size = 16, fill }: DownloadIconProps) {
|
||||
// apply them to the circle using native props
|
||||
useEffect(() => {
|
||||
const subscription = offsetAnimation.addListener((offset) => {
|
||||
// @ts-expect-error undocumented functionality
|
||||
const setNativeProps = circleRef.current?.setNativeProps as (props: CircleProps) => void | undefined;
|
||||
setNativeProps?.({ strokeDashoffset: offset.value });
|
||||
});
|
||||
@@ -93,7 +92,6 @@ function DownloadIcon({ trackId, size = 16, fill }: DownloadIconProps) {
|
||||
cy={radius}
|
||||
r={radius - 1}
|
||||
stroke={iconFill}
|
||||
// @ts-expect-error react-native-svg has outdated react-native typings
|
||||
ref={circleRef}
|
||||
strokeWidth={1.5}
|
||||
strokeDasharray={[ circumference, circumference ]}
|
||||
|
||||
@@ -19,7 +19,14 @@ export function calculateProgressTranslation(
|
||||
) {
|
||||
'worklet';
|
||||
const completion = position / reference;
|
||||
const output = (1 - (completion || 0)) * -1 * width;
|
||||
|
||||
// GUARD: Check whether the calculated number is valid and not infinite
|
||||
if (Number.isNaN(completion) || !Number.isFinite(completion)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
const output = (1 - completion) * -1 * width;
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user