1
0
mirror of https://github.com/vrtmrz/obsidian-livesync.git synced 2025-08-10 22:11:45 +02:00

Implemented:

- `Resolve all conflicted files` has been implemented.
Fixed:
- Fixed a problem about reading chunks online when a file has more chunks than the concurrency limit.
Rollbacked:
- Logs are kept only for 100 lines, again.
This commit is contained in:
vorotamoroz
2023-03-02 12:54:41 +09:00
parent 7bf6d1f663
commit b16333c604
2 changed files with 12 additions and 3 deletions

Submodule src/lib updated: f5ca1c09d9...8985fa74e9

View File

@@ -216,12 +216,14 @@ export default class ObsidianLiveSyncPlugin extends Plugin {
const notesList = notes.map(e => e.path);
if (notesList.length == 0) {
Logger("There are no conflicted documents", LOG_LEVEL.NOTICE);
return;
return false;
}
const target = await askSelectString(this.app, "File to view History", notesList);
if (target) {
await this.resolveConflicted(target);
return true;
}
return false;
}
async resolveConflicted(target: string) {
if (isInternalMetadata(target)) {
@@ -714,6 +716,13 @@ export default class ObsidianLiveSyncPlugin extends Plugin {
this.pickFileForResolve();
},
})
this.addCommand({
id: "livesync-all-conflictcheck",
name: "Resolve all conflicted files",
callback: async () => {
while (await this.pickFileForResolve());
},
})
this.addCommand({
id: "livesync-runbatch",
name: "Run pended batch processes",
@@ -1302,7 +1311,7 @@ export default class ObsidianLiveSyncPlugin extends Plugin {
}
this.app.vault.adapter.append(normalizePath(logDate), vaultName + ":" + newMessage + "\n");
}
logMessageStore.apply(e => [...e, newMessage].slice(this.settings.showVerboseLog ? -1000 : -100));
logMessageStore.apply(e => [...e, newMessage].slice(-100));
this.setStatusBarText(null, messageContent);
if (level >= LOG_LEVEL.NOTICE) {