From afb0edb20b73682c0bf967adfbbe9dda7a07cc4e Mon Sep 17 00:00:00 2001 From: xianyi Date: Wed, 21 Jan 2026 11:58:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=95=E9=83=A8=E5=AE=89=E5=85=A8=E8=B7=9D?= =?UTF-8?q?=E7=A6=BB&=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/(tabs)/index.tsx | 7 ++++++- app/profile.tsx | 20 +++++++++++++++----- components/matches-by-league.tsx | 7 ++++++- 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/app/(tabs)/index.tsx b/app/(tabs)/index.tsx index 03ef8f2..0c7cf9d 100644 --- a/app/(tabs)/index.tsx +++ b/app/(tabs)/index.tsx @@ -29,11 +29,13 @@ import { TouchableOpacity, View, } from "react-native"; +import { useSafeAreaInsets } from "react-native-safe-area-context"; export default function HomeScreen() { const router = useRouter(); const { theme } = useTheme(); const { t } = useTranslation(); + const insets = useSafeAreaInsets(); const isDark = theme === "dark"; const iconColor = isDark ? Colors.dark.icon : Colors.light.icon; const filterBg = isDark ? "#2C2C2E" : "#F2F2F7"; @@ -625,7 +627,10 @@ export default function HomeScreen() { ) : null } - contentContainerStyle={styles.listContent} + contentContainerStyle={[ + styles.listContent, + { paddingBottom: 80 + insets.bottom }, + ]} ListEmptyComponent={ {t("home.no_matches")} diff --git a/app/profile.tsx b/app/profile.tsx index d2d8af6..0ca3719 100644 --- a/app/profile.tsx +++ b/app/profile.tsx @@ -12,9 +12,11 @@ import { TouchableOpacity, View, } from "react-native"; +import { useSafeAreaInsets } from "react-native-safe-area-context"; import { ThemedText } from "@/components/themed-text"; import { IconSymbol } from "@/components/ui/icon-symbol"; +import { Colors } from "@/constants/theme"; import { useAppState } from "@/context/AppStateContext"; import { useTheme } from "@/context/ThemeContext"; import { changeLanguage, SUPPORTED_LANGUAGES } from "@/i18n"; @@ -37,6 +39,7 @@ const BOOKMAKERS = [ export default function ProfileScreen() { const { theme, toggleTheme, setTheme, isSystemTheme, useSystemTheme } = useTheme(); + const insets = useSafeAreaInsets(); const { state, updateOddsSettings, @@ -215,7 +218,7 @@ export default function ProfileScreen() { headerBackTitle: t("settings.back"), // Ensure header matches theme to avoid white flash headerStyle: { - backgroundColor: isDark ? "#000" : "#f2f2f7", + backgroundColor: isDark ? Colors.dark.background : "#f2f2f7", }, headerTintColor: textColor, headerShadowVisible: false, @@ -223,14 +226,17 @@ export default function ProfileScreen() { presentation: "card", animation: "slide_from_right", // Set the scene/content background to match theme during transition - contentStyle: { backgroundColor: isDark ? "#000" : "#f2f2f7" }, + contentStyle: { + backgroundColor: isDark ? Colors.dark.background : "#f2f2f7", + }, }} /> {t("settings.language")} - + {getCurrentLanguageName()} {leagues.map((league) => { const isCollapsed = collapsed[league.key] !== false;