feat: 适配 headerbar ios26
This commit is contained in:
@@ -16,6 +16,7 @@ import {
|
||||
import { HeaderBar } from '@/components/ui/HeaderBar';
|
||||
import { IntensityBadge, WorkoutDetailModal } from '@/components/workout/WorkoutDetailModal';
|
||||
|
||||
import { useSafeAreaTop } from '@/hooks/useSafeAreaWithPadding';
|
||||
import { getWorkoutDetailMetrics, WorkoutDetailMetrics } from '@/services/workoutDetail';
|
||||
import {
|
||||
addHealthPermissionListener,
|
||||
@@ -283,6 +284,8 @@ export default function WorkoutHistoryScreen() {
|
||||
const [monthOccurrenceText, setMonthOccurrenceText] = useState<string | null>(null);
|
||||
const [monthlyStats, setMonthlyStats] = useState<MonthlyStatsInfo | null>(null);
|
||||
|
||||
const safeAreaTop = useSafeAreaTop()
|
||||
|
||||
const loadHistory = useCallback(async () => {
|
||||
setIsLoading(true);
|
||||
setError(null);
|
||||
@@ -532,7 +535,7 @@ export default function WorkoutHistoryScreen() {
|
||||
colors={["#F3F5FF", "#FFFFFF"]}
|
||||
style={StyleSheet.absoluteFill}
|
||||
/>
|
||||
<HeaderBar title="锻炼历史" variant="minimal" transparent={true} />
|
||||
<HeaderBar title="锻炼总结" variant="minimal" transparent={true} />
|
||||
{isLoading ? (
|
||||
<View style={styles.loadingContainer}>
|
||||
<ActivityIndicator size="large" color="#5C55FF" />
|
||||
@@ -540,7 +543,9 @@ export default function WorkoutHistoryScreen() {
|
||||
</View>
|
||||
) : (
|
||||
<SectionList
|
||||
style={styles.sectionList}
|
||||
style={[styles.sectionList, {
|
||||
paddingTop: safeAreaTop
|
||||
}]}
|
||||
sections={sections}
|
||||
keyExtractor={(item) => item.id}
|
||||
renderItem={renderItem}
|
||||
|
||||
Reference in New Issue
Block a user