diff --git a/app.json b/app.json
index e42885b..c633dce 100644
--- a/app.json
+++ b/app.json
@@ -155,7 +155,14 @@
],
"./plugins/withHuaweiPush",
"expo-callkit-telecom",
- "expo-splash-screen",
+ [
+ "expo-splash-screen",
+ {
+ "image": "./assets/splash-icon.png",
+ "resizeMode": "contain",
+ "backgroundColor": "#ffffff"
+ }
+ ],
"expo-status-bar"
],
"extra": {
diff --git a/app/(app)/(tabs)/_layout.tsx b/app/(app)/(tabs)/_layout.tsx
index d4e2844..e6260fd 100644
--- a/app/(app)/(tabs)/_layout.tsx
+++ b/app/(app)/(tabs)/_layout.tsx
@@ -1,6 +1,6 @@
import { useMemo, useCallback } from 'react';
import { Platform, Pressable, useWindowDimensions } from 'react-native';
-import { Tabs, usePathname } from 'expo-router';
+import { Tabs, usePathname, useRouter } from 'expo-router';
import { MaterialCommunityIcons } from '@expo/vector-icons';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import type { PressableProps } from 'react-native';
@@ -28,6 +28,7 @@ export default function TabsLayout() {
const { width } = useWindowDimensions();
const insets = useSafeAreaInsets();
const pathname = usePathname();
+ const router = useRouter();
const unreadCount = useTotalUnreadCount();
const scrollHideTabBar = useHomeTabBarVisibilityStore((s) => s.bottomTabBarHiddenByScroll);
const triggerHomeTabPress = useHomeTabPressStore((s) => s.triggerPress);
@@ -41,6 +42,18 @@ export default function TabsLayout() {
}
}, [pathname, triggerHomeTabPress]);
+ const handleAppsTabPress = useCallback(() => {
+ if (pathname.startsWith('/apps/')) {
+ router.replace('/apps');
+ }
+ }, [pathname, router]);
+
+ const handleProfileTabPress = useCallback(() => {
+ if (pathname.startsWith('/profile/')) {
+ router.replace('/profile');
+ }
+ }, [pathname, router]);
+
const tabBarStyle = useMemo(() => {
if (hideTabBar) {
return { display: 'none' as const, height: 0, overflow: 'hidden' as const };
@@ -116,6 +129,9 @@ export default function TabsLayout() {
/>
),
}}
+ listeners={{
+ tabPress: handleAppsTabPress,
+ }}
/>
),
}}
+ listeners={{
+ tabPress: handleProfileTabPress,
+ }}
/>
);
diff --git a/src/components/business/PostCard/PostCard.tsx b/src/components/business/PostCard/PostCard.tsx
index 9e2a58c..35927c5 100644
--- a/src/components/business/PostCard/PostCard.tsx
+++ b/src/components/business/PostCard/PostCard.tsx
@@ -662,7 +662,7 @@ const PostCardInner: React.FC = (normalizedProps) => {
) : (
- {highlightKeyword ? : contentPreview}
+ {highlightKeyword ? : contentPreview}
)}
@@ -676,7 +676,7 @@ const PostCardInner: React.FC = (normalizedProps) => {
{!!post.title && (
- {highlightKeyword ? : post.title}
+ {highlightKeyword ? : post.title}
)}
@@ -748,7 +748,7 @@ const PostCardInner: React.FC = (normalizedProps) => {
{!!post.title && (
- {highlightKeyword ? : post.title}
+ {highlightKeyword ? : post.title}
)}
@@ -758,7 +758,7 @@ const PostCardInner: React.FC = (normalizedProps) => {
style={styles.content}
numberOfLines={isExpanded ? undefined : contentNumberOfLines}
>
- {highlightKeyword ? : content}
+ {highlightKeyword ? : content}
{shouldTruncate && (
setIsExpanded((prev) => !prev)} style={styles.expandBtn}>
diff --git a/src/components/business/PostContentRenderer.tsx b/src/components/business/PostContentRenderer.tsx
index 9f6d106..bc5d74a 100644
--- a/src/components/business/PostContentRenderer.tsx
+++ b/src/components/business/PostContentRenderer.tsx
@@ -61,7 +61,7 @@ const PostContentRenderer: React.FC = ({
return (
{highlightKeyword && content ? (
-
+
) : (
content || ''
)}
@@ -85,7 +85,7 @@ const PostContentRenderer: React.FC = ({
elements.push(
{highlightKeyword ? (
-
+
) : (
text
)}
@@ -125,7 +125,7 @@ const PostContentRenderer: React.FC = ({
return (
{highlightKeyword && content ? (
-
+
) : (
content || ''
)}
diff --git a/src/components/business/UserProfileHeader.tsx b/src/components/business/UserProfileHeader.tsx
index 52e7417..8ec38e0 100644
--- a/src/components/business/UserProfileHeader.tsx
+++ b/src/components/business/UserProfileHeader.tsx
@@ -551,7 +551,6 @@ function createUserProfileHeaderStyles(colors: AppColors) {
minWidth: 160,
backgroundColor: colors.background.paper,
borderRadius: borderRadius.lg,
- ...shadows.lg,
borderWidth: StyleSheet.hairlineWidth,
borderColor: colors.divider,
overflow: 'hidden',
diff --git a/src/screens/home/HomeScreen.tsx b/src/screens/home/HomeScreen.tsx
index ba0cfe4..a027b7a 100644
--- a/src/screens/home/HomeScreen.tsx
+++ b/src/screens/home/HomeScreen.tsx
@@ -364,7 +364,7 @@ export const HomeScreen: React.FC = () => {
useEffect(() => {
if (homeTabPressCount > 0) {
// 滚动 FlashList 到顶部
- flashListRef.current?.scrollToOffset({ offset: 0, animated: true });
+ flashListRef.current?.scrollToOffset({ offset: 0, animated: false });
// 滚动 ScrollView 到顶部(网格模式)
scrollViewRef.current?.scrollTo({ y: 0, animated: true });
// 重置底部 Tab 栏状态
diff --git a/src/screens/message/components/ChatScreen/styles.ts b/src/screens/message/components/ChatScreen/styles.ts
index 54c7925..609d4c7 100644
--- a/src/screens/message/components/ChatScreen/styles.ts
+++ b/src/screens/message/components/ChatScreen/styles.ts
@@ -208,11 +208,6 @@ export function createChatScreenStyles(colors: AppColors, dynamicStyles?: {
backgroundColor: 'rgba(255, 255, 255, 0.96)',
borderWidth: StyleSheet.hairlineWidth,
borderColor: 'rgba(0, 0, 0, 0.08)',
- shadowColor: colors.chat.shadow,
- shadowOffset: { width: 0, height: 2 },
- shadowOpacity: 0.12,
- shadowRadius: 6,
- elevation: 4,
},
jumpToLatestFabText: {
fontSize: 13,
diff --git a/src/screens/message/components/ChatScreen/useChatScreen.ts b/src/screens/message/components/ChatScreen/useChatScreen.ts
index 5e5a231..f64ab6a 100644
--- a/src/screens/message/components/ChatScreen/useChatScreen.ts
+++ b/src/screens/message/components/ChatScreen/useChatScreen.ts
@@ -1104,7 +1104,10 @@ export const useChatScreen = (props?: ChatScreenProps) => {
setSending(true);
try {
- const segments: MessageSegment[] = [...buildTextSegments(trimmedText, replyingTo)];
+ // 有文本或回复时才构建文本段,纯图片时不塞空 text
+ const segments: MessageSegment[] = (trimmedText || replyingTo)
+ ? [...buildTextSegments(trimmedText, replyingTo)]
+ : [];
for (const url of uploadedUrls) {
segments.push({
type: 'image',
diff --git a/src/screens/profile/UserScreen.tsx b/src/screens/profile/UserScreen.tsx
index af8a6fb..89051dd 100644
--- a/src/screens/profile/UserScreen.tsx
+++ b/src/screens/profile/UserScreen.tsx
@@ -24,7 +24,7 @@ export const UserScreen: React.FC = () => {
);