You've already forked obsidian-livesync
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:
2
src/lib
2
src/lib
Submodule src/lib updated: f5ca1c09d9...8985fa74e9
13
src/main.ts
13
src/main.ts
@@ -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) {
|
||||
|
Reference in New Issue
Block a user