feat: 评论去重——评过的笔记自动跳过,不再重复评论 v1.8.3
成功评论后把笔记 ID 写入本机「已评论索引」(上限5000条,自动淘汰最旧),列表流程与直接打开笔记页两条路径评论前都查索引,命中即跳过;进度条新增「已跳过已评论」实时统计,侧边栏评论记录新增「已去重」;进度条统计行加 flex-wrap+nowrap 防窄窗口文字挤压。
This commit is contained in:
1 parent
51fd1bc1b4
commit
98170e6d8a
8 files changed
+126
-8
No files matched your search
+7
-1
@@ -994,8 +994,14 @@ class AutoCommentManager {
|
||||
// 从存储加载评论记录
|
||||
async loadCommentLogs() {
|
||||
try {
|
||||
const result = await chrome.storage.local.get(['commentLogs']);
|
||||
const result = await chrome.storage.local.get(['commentLogs', 'commentedNotes']);
|
||||
this.renderCommentLogs(result.commentLogs || []);
|
||||
// 已去重统计:这些笔记之后都会自动跳过,不再重复评论
|
||||
const dedupEl = document.getElementById('stat-dedup');
|
||||
if (dedupEl) {
|
||||
const map = result.commentedNotes;
|
||||
dedupEl.textContent = (map && typeof map === 'object') ? Object.keys(map).length : 0;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('加载评论记录失败:', error);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user