perf(store): 优化 selector 性能并移除未使用代码

- 使用 createSelector 和 useMemo 优化 medications 和 tabBarConfig 的 selector,避免不必要的重渲染
- 添加空数组常量 EMPTY_RECORDS_ARRAY,减少对象创建开销
- 移除 _layout.tsx 中未使用的路由配置
- 删除过时的通知实现文档
- 移除 pushNotificationManager 中未使用的 token 刷新监听器
- 禁用开发环境的后台任务调试工具初始化
This commit is contained in:
richarjiang
2025-11-24 11:11:29 +08:00
parent c1c9f22111
commit 3db2d39a58
6 changed files with 88 additions and 393 deletions

View File

@@ -90,9 +90,6 @@ export class PushNotificationManager {
// 检查是否需要注册令牌
await this.checkAndRegisterToken(token);
// 设置令牌刷新监听器
this.setupTokenRefreshListener();
this.isInitialized = true;
console.log('推送通知管理器初始化成功');
return true;
@@ -313,16 +310,6 @@ export class PushNotificationManager {
}
}
/**
* 设置令牌刷新监听器
*/
private setupTokenRefreshListener(): void {
// 监听令牌变化iOS上通常不会频繁变化
Notifications.addNotificationResponseReceivedListener((response) => {
console.log('收到推送通知响应:', response);
});
}
/**
* 获取当前设备令牌
*/