mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-05-01 13:21:51 +00:00
### Fixed
- No longer `No available splitter for settings!!` errors occur after fetching old remote settings while rebuilding local database. ### Improved - Boot sequence warning is now kept in the in-editor notification area. (#748) ### New feature - We can now set the maximum modified time for reflect events in the settings. (for #754) ### Refactored - Module to service refactoring has been started for better maintainability: - UI module has been moved to UI service. ### Behaviour change - Default chunk splitter version has been changed to `Rabin-Karp` for new installations.
This commit is contained in:
@@ -318,6 +318,20 @@ export class ReplicateResultProcessor {
|
||||
*/
|
||||
async parseDocumentChange(change: PouchDB.Core.ExistingDocument<EntryDoc>) {
|
||||
try {
|
||||
if (isAnyNote(change)) {
|
||||
const docMtime = change.mtime ?? 0;
|
||||
const maxMTime = this.replicator.settings.maxMTimeForReflectEvents;
|
||||
if (maxMTime > 0 && docMtime > maxMTime) {
|
||||
const docPath = getPath(change);
|
||||
this.log(
|
||||
`Processing ${docPath} has been skipped due to modification time (${new Date(
|
||||
docMtime * 1000
|
||||
).toISOString()}) exceeding the limit`,
|
||||
LOG_LEVEL_INFO
|
||||
);
|
||||
return;
|
||||
}
|
||||
}
|
||||
// If the document is a virtual document, process it in the virtual document processor.
|
||||
if (await this.services.replication.processVirtualDocument(change)) return;
|
||||
// If the document is version info, check compatibility and return.
|
||||
|
||||
Reference in New Issue
Block a user