fix: 修复 4 个正确性问题(分享秒数/主题同步/云推送定位/streak重算)
- timer: 完成弹窗存实际时长 completionActualElapsed,分享改用它,避免用动画值导致秒数错误 - theme: setTheme 补 _markLocalChanged,避免云恢复覆盖未同步的主题改动 - cloud: _doPush 重定位查询补 orderBy(updatedAt desc),与 pullAll 一致,避免命中最旧文档 - storage: deleteRecord 改用 recomputeStreak,修复删连续链中间某天 streak 虚高 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -96,6 +96,8 @@ const setTheme = (id) => {
|
||||
const app = getApp()
|
||||
if (app && app.globalData) app.globalData.theme = theme
|
||||
|
||||
// 标记本地已改动,避免下次启动云恢复用旧 themeId 覆盖刚选的主题
|
||||
try { require('./storage')._markLocalChanged() } catch (e) {}
|
||||
// sync to cloud (lazy-require to avoid circular deps)
|
||||
try { require('./cloud').pushAll() } catch (e) {}
|
||||
return theme
|
||||
|
||||
Reference in New Issue
Block a user