From df868d2781290389d96cc2cda30790d1390c8adf Mon Sep 17 00:00:00 2001
From: cgeek <cem.moreau@gmail.com>
Date: Mon, 9 Jul 2018 17:33:04 +0200
Subject: [PATCH] [fix] sync: was still a bit slower in duniter-ui than `sync`
 command

---
 app/lib/dal/indexDAL/loki/LokiCollection.ts | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/lib/dal/indexDAL/loki/LokiCollection.ts b/app/lib/dal/indexDAL/loki/LokiCollection.ts
index c912a7547..04ee58878 100644
--- a/app/lib/dal/indexDAL/loki/LokiCollection.ts
+++ b/app/lib/dal/indexDAL/loki/LokiCollection.ts
@@ -38,6 +38,7 @@ export class LokiProxyCollection<T> implements LokiCollection<T> {
 
   setChangesApi(enabled: boolean) {
     this.collection.setChangesApi(enabled)
-    ;(this.collection as any).disableDeltaChangesApi = true
+    // This is a Loki bug: `disableDeltaChangesApi` should be impacted just like `disableChangesApi`:
+    ;(this.collection as any).disableDeltaChangesApi = !enabled
   }
 }
-- 
GitLab