feat: 适配 headerbar ios26
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { HeaderBar } from '@/components/ui/HeaderBar';
|
||||
import { useSafeAreaTop } from '@/hooks/useSafeAreaWithPadding';
|
||||
import {
|
||||
getWorkoutNotificationPreferences,
|
||||
resetWorkoutNotificationPreferences,
|
||||
@@ -30,6 +31,7 @@ const WORKOUT_TYPES = [
|
||||
];
|
||||
|
||||
export default function WorkoutNotificationSettingsScreen() {
|
||||
const safeAreaTop = useSafeAreaTop()
|
||||
const router = useRouter();
|
||||
const [preferences, setPreferences] = useState<WorkoutNotificationPreferences>({
|
||||
enabled: true,
|
||||
@@ -152,6 +154,9 @@ export default function WorkoutNotificationSettingsScreen() {
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<HeaderBar title="锻炼通知设置" onBack={() => router.back()} />
|
||||
<View style={{
|
||||
paddingTop: safeAreaTop
|
||||
}}></View>
|
||||
<View style={styles.loadingContainer}>
|
||||
<Text>加载中...</Text>
|
||||
</View>
|
||||
@@ -163,7 +168,11 @@ export default function WorkoutNotificationSettingsScreen() {
|
||||
<View style={styles.container}>
|
||||
<HeaderBar title="锻炼通知设置" onBack={() => router.back()} />
|
||||
|
||||
<ScrollView style={styles.content} showsVerticalScrollIndicator={false}>
|
||||
<ScrollView style={styles.content} showsVerticalScrollIndicator={false} contentContainerStyle={
|
||||
{
|
||||
paddingTop: safeAreaTop
|
||||
}
|
||||
}>
|
||||
{/* 主开关 */}
|
||||
<View style={styles.section}>
|
||||
<View style={styles.settingItem}>
|
||||
|
||||
Reference in New Issue
Block a user