♻️ 书源 id 去掉 ext. 前缀,沿用旧内置源数据
Co-authored-by: Copilot <[email protected]>
This commit is contained in:
1 parent
01e572a5ee
commit
f8ad3f73a6
29 files changed
+173
-173
No files matched your search
@@ -865,15 +865,15 @@ do -- 微信同文异位的离线笔记不能在开书时丢失,也不能落
|
||||
drawer = "lighten", text = "重复原文", note = "想法二" },
|
||||
}
|
||||
local wechat = {
|
||||
id = "ext.weread",
|
||||
id = "weread",
|
||||
cleanAnnotations = function(_self, items, total) return Notes.cleanAnnotations(items, total) end,
|
||||
mergeAnnotations = function(_self, remote, live, paging, authoritative)
|
||||
return Notes.mergeAnnotations(remote, live, paging, authoritative)
|
||||
end,
|
||||
}
|
||||
local ref = { source_id = "ext.weread", stable_id = "offline-notes", source = wechat }
|
||||
local ref = { source_id = "weread", stable_id = "offline-notes", source = wechat }
|
||||
open_files["/offline-notes.epub"] = ref
|
||||
rows["ext.weread:offline-notes:0"] = { payload = JSON.encode({}), updated_at = 1, sync_status = 0 }
|
||||
rows["weread:offline-notes:0"] = { payload = JSON.encode({}), updated_at = 1, sync_status = 0 }
|
||||
local flushed = 0
|
||||
local reader = {
|
||||
document = { file = "/offline-notes.epub", getPageCount = function() return 10 end },
|
||||
@@ -888,7 +888,7 @@ do -- 微信同文异位的离线笔记不能在开书时丢失,也不能落
|
||||
Assert.eq(current[2].note, "想法二")
|
||||
Assert.eq(flushed, 0, "不能把误判为重复的丢线结果刷新到 sidecar")
|
||||
SessionNote.save(reader, ref)
|
||||
local stored = JSON.decode(rows["ext.weread:offline-notes:0"].payload)
|
||||
local stored = JSON.decode(rows["weread:offline-notes:0"].payload)
|
||||
Assert.len(stored, 2)
|
||||
Assert.eq(stored[1].note, "想法一")
|
||||
Assert.eq(stored[2].note, "想法二")
|
||||
|
||||
Reference in new issue
Block a user