feat: 添加后台任务测试通知功能,优化滑动删除交互体验
This commit is contained in:
@@ -424,6 +424,19 @@ export default function ExploreScreen() {
|
||||
handler: async () => {
|
||||
try {
|
||||
console.log('后台任务:更新健康数据和检查压力水平...');
|
||||
|
||||
// 发送测试通知,验证后台任务是否执行
|
||||
await notificationService.sendImmediateNotification({
|
||||
title: '后台任务测试 🔔',
|
||||
body: `任务执行时间: ${new Date().toLocaleTimeString('zh-CN')}`,
|
||||
data: {
|
||||
type: 'background_task_test',
|
||||
timestamp: new Date().toISOString(),
|
||||
},
|
||||
sound: true,
|
||||
priority: 'high'
|
||||
});
|
||||
|
||||
// 后台任务只更新健康数据,强制刷新以获取最新数据
|
||||
await loadHealthData(undefined, true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user