mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-11-14 20:20:12 +00:00
refactor(syncguard): read host-local preferences
This commit is contained in:
1 parent
9b47310a3c
commit
7c1385fd79
2 files changed
+10
-7
No files matched your search
@@ -50,17 +50,20 @@ function setup(overrides: { enabled?: boolean; minimumFiles?: number } = {}) {
|
||||
const batched = reactiveSource(0);
|
||||
const conflictProcessQueueCount = reactiveSource(0);
|
||||
const settings = {
|
||||
syncGuardEnabled: overrides.enabled ?? true,
|
||||
syncGuardMinimumFiles: overrides.minimumFiles ?? 2,
|
||||
};
|
||||
const sharedSettings = {
|
||||
isConfigured: true,
|
||||
liveSync: true,
|
||||
remoteType: REMOTE_COUCHDB,
|
||||
syncGuardEnabled: overrides.enabled ?? true,
|
||||
syncGuardMinimumFiles: overrides.minimumFiles ?? 2,
|
||||
};
|
||||
const host = {
|
||||
services: {
|
||||
context: createServiceContext(),
|
||||
setting: {
|
||||
currentSettings: () => settings,
|
||||
currentSettings: () => sharedSettings,
|
||||
syncGuardSettings: settings,
|
||||
onSettingRealised: { addHandler: (fn: () => Promise<boolean>) => onSettingRealised.push(fn) },
|
||||
},
|
||||
replication: {
|
||||
|
||||
Reference in new issue
Block a user