Refactor: Remove background task management and related hooks
- Deleted `useBackgroundTasks.ts` hook and its associated logic for managing background tasks. - Removed `backgroundTaskManager.ts` service and all related task definitions and registrations. - Cleaned up `Podfile.lock` and `package.json` to remove unused dependencies related to background tasks. - Updated iOS project files to eliminate references to removed background task components. - Added new background fetch identifier in `Info.plist` for future use.
This commit is contained in:
@@ -3,10 +3,12 @@ import { useThemeColor } from '@/hooks/useThemeColor';
|
||||
import { DietRecord } from '@/services/dietRecords';
|
||||
import { Ionicons } from '@expo/vector-icons';
|
||||
import dayjs from 'dayjs';
|
||||
import { Image } from 'expo-image';
|
||||
import React, { useMemo, useRef, useState } from 'react';
|
||||
import { Alert, Image, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
|
||||
import { Alert, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
|
||||
import { RectButton, Swipeable } from 'react-native-gesture-handler';
|
||||
|
||||
|
||||
export type NutritionRecordCardProps = {
|
||||
record: DietRecord;
|
||||
onPress?: () => void;
|
||||
@@ -162,7 +164,11 @@ export function NutritionRecordCard({
|
||||
{/* 左侧:食物图片 */}
|
||||
<View style={[styles.foodImageContainer, !record.imageUrl && styles.foodImagePlaceholder]}>
|
||||
{record.imageUrl ? (
|
||||
<Image source={{ uri: record.imageUrl }} style={styles.foodImage} />
|
||||
<Image
|
||||
source={{ uri: record.imageUrl }}
|
||||
style={styles.foodImage}
|
||||
cachePolicy={'memory-disk'}
|
||||
/>
|
||||
) : (
|
||||
<Ionicons name="restaurant" size={28} color={textSecondaryColor} />
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user