-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #634 from lovegaoshi/dev
fix: color
- Loading branch information
Showing
16 changed files
with
170 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,6 @@ | |
"editor.formatOnSave": true, | ||
"search.exclude": { | ||
"MusicFreePlugins": true | ||
} | ||
}, | ||
"editor.tabSize": 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
diff --git a/node_modules/react-native-draggable-flatlist/src/components/DraggableFlatList.tsx b/node_modules/react-native-draggable-flatlist/src/components/DraggableFlatList.tsx | ||
index d7d98c2..2f59c7a 100644 | ||
--- a/node_modules/react-native-draggable-flatlist/src/components/DraggableFlatList.tsx | ||
+++ b/node_modules/react-native-draggable-flatlist/src/components/DraggableFlatList.tsx | ||
@@ -295,7 +295,7 @@ function DraggableFlatListInner<T>(props: DraggableFlatListProps<T>) { | ||
const springTo = placeholderOffset.value - activeCellOffset.value; | ||
touchTranslate.value = withSpring( | ||
springTo, | ||
- animationConfigRef.current, | ||
+ animationConfigRef.value, | ||
() => { | ||
runOnJS(onDragEnd)({ | ||
from: activeIndexAnim.value, | ||
diff --git a/node_modules/react-native-draggable-flatlist/src/context/refContext.tsx b/node_modules/react-native-draggable-flatlist/src/context/refContext.tsx | ||
index ea21575..66c5eed 100644 | ||
--- a/node_modules/react-native-draggable-flatlist/src/context/refContext.tsx | ||
+++ b/node_modules/react-native-draggable-flatlist/src/context/refContext.tsx | ||
@@ -1,14 +1,14 @@ | ||
import React, { useContext } from "react"; | ||
import { useMemo, useRef } from "react"; | ||
import { FlatList } from "react-native-gesture-handler"; | ||
-import Animated, { WithSpringConfig } from "react-native-reanimated"; | ||
+import Animated, { type SharedValue, useSharedValue, WithSpringConfig } from "react-native-reanimated"; | ||
import { DEFAULT_PROPS } from "../constants"; | ||
import { useProps } from "./propsContext"; | ||
import { CellData, DraggableFlatListProps } from "../types"; | ||
|
||
type RefContextValue<T> = { | ||
propsRef: React.MutableRefObject<DraggableFlatListProps<T>>; | ||
- animationConfigRef: React.MutableRefObject<WithSpringConfig>; | ||
+ animationConfigRef: SharedValue<WithSpringConfig>; | ||
cellDataRef: React.MutableRefObject<Map<string, CellData>>; | ||
keyToIndexRef: React.MutableRefObject<Map<string, number>>; | ||
containerRef: React.RefObject<Animated.View>; | ||
@@ -54,8 +54,8 @@ function useSetupRefs<T>({ | ||
...DEFAULT_PROPS.animationConfig, | ||
...animationConfig, | ||
} as WithSpringConfig; | ||
- const animationConfigRef = useRef(animConfig); | ||
- animationConfigRef.current = animConfig; | ||
+ const animationConfigRef = useSharedValue(animConfig); | ||
+ animationConfigRef.value = animConfig; | ||
|
||
const cellDataRef = useRef(new Map<string, CellData>()); | ||
const keyToIndexRef = useRef(new Map<string, number>()); | ||
diff --git a/node_modules/react-native-draggable-flatlist/src/hooks/useCellTranslate.tsx b/node_modules/react-native-draggable-flatlist/src/hooks/useCellTranslate.tsx | ||
index ce4ab68..efea240 100644 | ||
--- a/node_modules/react-native-draggable-flatlist/src/hooks/useCellTranslate.tsx | ||
+++ b/node_modules/react-native-draggable-flatlist/src/hooks/useCellTranslate.tsx | ||
@@ -101,7 +101,7 @@ export function useCellTranslate({ cellIndex, cellSize, cellOffset }: Params) { | ||
? activeCellSize.value * (isAfterActive ? -1 : 1) | ||
: 0; | ||
|
||
- return withSpring(translationAmt, animationConfigRef.current); | ||
+ return withSpring(translationAmt, animationConfigRef.value); | ||
}, [activeKey, cellIndex]); | ||
|
||
return translate; | ||
diff --git a/node_modules/react-native-draggable-flatlist/src/hooks/useOnCellActiveAnimation.ts b/node_modules/react-native-draggable-flatlist/src/hooks/useOnCellActiveAnimation.ts | ||
index 7c20587..cfc6a4f 100644 | ||
--- a/node_modules/react-native-draggable-flatlist/src/hooks/useOnCellActiveAnimation.ts | ||
+++ b/node_modules/react-native-draggable-flatlist/src/hooks/useOnCellActiveAnimation.ts | ||
@@ -1,6 +1,7 @@ | ||
import { useRef } from "react"; | ||
import Animated, { | ||
useDerivedValue, | ||
+ useSharedValue, | ||
withSpring, | ||
WithSpringConfig, | ||
} from "react-native-reanimated"; | ||
@@ -15,8 +16,8 @@ type Params = { | ||
export function useOnCellActiveAnimation( | ||
{ animationConfig }: Params = { animationConfig: {} } | ||
) { | ||
- const animationConfigRef = useRef(animationConfig); | ||
- animationConfigRef.current = animationConfig; | ||
+ const animationConfigRef = useSharedValue(animationConfig); | ||
+ animationConfigRef.value = animationConfig; | ||
|
||
const isActive = useIsActive(); | ||
|
||
@@ -26,7 +27,7 @@ export function useOnCellActiveAnimation( | ||
const toVal = isActive && isTouchActiveNative.value ? 1 : 0; | ||
return withSpring(toVal, { | ||
...DEFAULT_ANIMATION_CONFIG, | ||
- ...animationConfigRef.current, | ||
+ ...animationConfigRef.value, | ||
}); | ||
}, [isActive]); | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { getHasGuard } from '@utils/Bilibili/BiliUser'; | ||
|
||
//暗精灵和小孩梓尊享APM VIP服务 | ||
const getBiliVIPStatus = () => getHasGuard([529249, 7706705]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import * as SecureStore from 'expo-secure-store'; | ||
import { useState } from 'react'; | ||
|
||
const VIPKey = 'APMVIP'; | ||
|
||
export const purchaseVIP = () => { | ||
SecureStore.setItemAsync(VIPKey, '1'); | ||
}; | ||
|
||
export const loseVIP = () => { | ||
SecureStore.deleteItemAsync(VIPKey); | ||
}; | ||
|
||
const useVIP = () => { | ||
const [vip, setVip] = useState(SecureStore.getItem(VIPKey) !== null); | ||
|
||
return { vip }; | ||
}; | ||
|
||
export default useVIP; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters