Skip to content

fix(LDStatusPro.user.js): prioritize summary stats over cloud cache for visit-day counters#36

Merged
caigg188 merged 2 commits intocaigg188:mainfrom
returnToInnocence:20260312-fix-visits
Mar 12, 2026
Merged

fix(LDStatusPro.user.js): prioritize summary stats over cloud cache for visit-day counters#36
caigg188 merged 2 commits intocaigg188:mainfrom
returnToInnocence:20260312-fix-visits

Conversation

@returnToInnocence
Copy link
Copy Markdown
Contributor

@returnToInnocence returnToInnocence commented Mar 11, 2026

在此感谢 @caigg188 的开源🫡,帮助我很大的忙,因为我刚入站一直担心自己短时间内没到二级,然后被取消账号资格清出去😭,有了您的项目可以看到升级进度以后,我就不焦虑了!再次感谢您的项目

对应 issue

#35

目的

修复“访问天数等指标长期不变化”的显示问题,如下图(这个是我加入 L 站的第 3 天,同时 L 站数据也可以看到我 visit 3 天了,因此判断为可能代码上有 bug)所示:
image

bug 分析

现有逻辑中云端数据优先且命中后直接返回,可能覆盖实时统计值;当云端未及时刷新时,用户会看到“访问天数不增加”等情况(如上图所示)。

解决方案

调整 fallback 数据源优先级,先读取了 LinuxDo summary.json 的实时统计,然后再回退云端同步数据。这样就避免了云端旧缓存数据被优先渲染,导致数据看起来没有变化。

测试结果

将修改后的版本代码重新加入油猴刷新 linux.do 以后,可以看到数据正常同步了
image

Comment thread LDStatusPro.user.js Outdated
// @name LDStatus Pro
// @namespace http://tampermonkey.net/
// @version 3.5.5.8
// @version 3.5.5.8.1
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个是我当时测试的时候多加了一个数字,然后后面第二个 commit 的时候我又给删掉啦,因为 version 肯定还是需要 @caigg188 佬来决定的🫡

@caigg188 caigg188 merged commit 12591f4 into caigg188:main Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants