fix: type error

- Created a new .watchmanconfig file to specify directories to ignore during file watching, enhancing performance and reducing unnecessary processing.
- Modified the Xcode project configuration to clean up output paths and ensure proper handling of build flags.
- Updated BottomTabProvider to use ResolvedTabScreenProps for better type safety.
- Adjusted spring configurations in various components for improved animation performance.
- Added Eye2CuteReIcon to EntryDetailScreen for enhanced user interface.

These changes aim to optimize the development workflow and improve the overall user experience in the mobile application.

Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
Innei
2025-09-23 00:27:51 +08:00
parent ba7e6ce8ce
commit 04f20e4431
7 changed files with 21 additions and 17 deletions
+3
View File
@@ -0,0 +1,3 @@
{
"ignore_dirs": ["node_modules", "dist", ".git", "ios", "android", "native"]
}
File diff suppressed because one or more lines are too long
@@ -4,7 +4,7 @@ import { useSharedValue } from "react-native-reanimated"
import type { BottomTabContextType } from "@/src/lib/navigation/bottom-tab/BottomTabContext"
import { BottomTabContext } from "@/src/lib/navigation/bottom-tab/BottomTabContext"
import type { TabScreenProps } from "@/src/lib/navigation/bottom-tab/types"
import type { ResolvedTabScreenProps } from "@/src/lib/navigation/bottom-tab/types"
import { BottomTabHeightProvider } from "./BottomTabHeightProvider"
import { BottomTabBarBackgroundContext } from "./contexts/BottomTabBarBackgroundContext"
@@ -29,7 +29,7 @@ export const BottomTabProvider = ({
() => ({
currentIndexAtom: tabIndexAtom,
loadedableIndexAtom: atom(new Set<number>()),
tabScreensAtom: atom<TabScreenProps[]>([]),
tabScreensAtom: atom<ResolvedTabScreenProps[]>([]),
tabHeightAtom: atom(0),
}),
[tabIndexAtom],
@@ -53,13 +53,11 @@ const SLOW_SPRING: WithSpringConfig = {
mass: isIOS ? 1.25 : 0.75,
damping: 300,
stiffness: 800,
restDisplacementThreshold: 0.01,
}
const FAST_SPRING: WithSpringConfig = {
mass: isIOS ? 1.25 : 0.75,
damping: 150,
stiffness: 900,
restDisplacementThreshold: 0.01,
}
function canAnimate(lightbox: Lightbox): boolean {
return (
+4 -4
View File
@@ -1,18 +1,18 @@
import type { SpringConfig } from "react-native-reanimated/lib/typescript/animation/springUtils"
import type { WithSpringConfig } from "react-native-reanimated"
export const gentleSpringPreset: SpringConfig = {
export const gentleSpringPreset: WithSpringConfig = {
damping: 15,
stiffness: 100,
mass: 1,
}
export const softSpringPreset: SpringConfig = {
export const softSpringPreset: WithSpringConfig = {
damping: 20,
stiffness: 80,
mass: 1,
}
export const quickSpringPreset: SpringConfig = {
export const quickSpringPreset: WithSpringConfig = {
damping: 10,
stiffness: 200,
mass: 1,
+2 -5
View File
@@ -73,12 +73,9 @@ export const AISummary: FC<{
const measureContent = (event: LayoutChangeEvent) => {
setContentHeight(event.nativeEvent.layout.height + 10)
height.value = withSpring(event.nativeEvent.layout.height + 10, {
dampingRatio: 2,
stiffness: 90,
overshootClamping: true,
restDisplacementThreshold: 0.01,
restSpeedThreshold: 0.01,
duration: 200,
dampingRatio: 0.8,
overshootClamping: true,
})
}
const purpleColor = useColor("purple")
@@ -23,6 +23,7 @@ import { ItemPressableStyle } from "@/src/components/ui/pressable/enum"
import { ItemPressable } from "@/src/components/ui/pressable/ItemPressable"
import { Text } from "@/src/components/ui/typography/Text"
import { CalendarTimeAddCuteReIcon } from "@/src/icons/calendar_time_add_cute_re"
import { Eye2CuteReIcon } from "@/src/icons/eye_2_cute_re"
import { openLink } from "@/src/lib/native"
import { useNavigation } from "@/src/lib/navigation/hooks"
import type { NavigationControllerView } from "@/src/lib/navigation/types"
@@ -217,6 +218,7 @@ const EntryInfo = ({ entryId }: { entryId: string }) => {
</View>
{!hideRecentReader && (
<View className="flex flex-row items-center gap-1">
<Eye2CuteReIcon width={16} height={16} color={secondaryLabelColor} />
<Text className="text-secondary-label text-sm leading-tight">{readCount}</Text>
</View>
)}