- No longer deleted hidden files were ignored.
- The document history dialogue is now able to process the deleted revisions.
- Deletion of a hidden file is now surely performed even if the file is already conflicted.
This commit is contained in:
vorotamoroz
2024-02-20 09:32:48 +00:00
parent e05f8771b9
commit 86b9695bc2
4 changed files with 54 additions and 27 deletions
+2 -1
View File
@@ -21,6 +21,7 @@ function isComparableTextDecode(path: string) {
return ["json"].includes(ext)
}
function readDocument(w: LoadedEntry) {
if (w.data.length == 0) return "";
if (isImage(w.path)) {
return new Uint8Array(decodeBinary(w.data));
}
@@ -71,7 +72,7 @@ export class DocumentHistoryModal extends Modal {
}
const db = this.plugin.localDatabase;
try {
const w = await db.localDatabase.get(this.id, { revs_info: true });
const w = await db.getRaw(this.id, { revs_info: true });
this.revs_info = w._revs_info?.filter((e) => e?.status == "available") ?? [];
this.range.max = `${Math.max(this.revs_info.length - 1, 0)}`;
this.range.value = this.range.max;