feat(fasting): 重构断食通知系统并增强可靠性

- 新增 useFastingNotifications hook 统一管理通知状态和同步逻辑
- 实现四阶段通知提醒:开始前30分钟、开始时、结束前30分钟、结束时
- 添加通知验证机制,确保通知正确设置和避免重复
- 新增 NotificationErrorAlert 组件显示通知错误并提供重试选项
- 实现断食计划持久化存储,应用重启后自动恢复
- 添加开发者测试面板用于验证通知系统可靠性
- 优化通知同步策略,支持选择性更新减少不必要的操作
- 修复个人页面编辑按钮样式问题
- 更新应用版本号至 1.0.18
This commit is contained in:
richarjiang
2025-10-14 15:05:11 +08:00
parent e03b2b3032
commit cf069f3537
18 changed files with 1565 additions and 242 deletions

View File

@@ -29,8 +29,11 @@ export type FastingPlan = {
export const FASTING_STORAGE_KEYS = {
preferredPlanId: '@fasting_preferred_plan',
notificationsRegistered: '@fasting_notifications_registered',
preStartNotificationId: '@fasting_notification_pre_start_id',
startNotificationId: '@fasting_notification_start_id',
preEndNotificationId: '@fasting_notification_pre_end_id',
endNotificationId: '@fasting_notification_end_id',
activeSchedule: '@fasting_active_schedule',
} as const;
export const FASTING_PLANS: FastingPlan[] = [