From 479fb2160017972e692b86821527c4aff1454d9b Mon Sep 17 00:00:00 2001 From: Andrey Platov Date: Wed, 22 Sep 2021 12:38:09 +0200 Subject: [PATCH] a strange fix Signed-off-by: Andrey Platov --- packages/core/src/client.ts | 4 ++-- packages/query/src/index.ts | 3 --- .../workbench-resources/src/components/EditStatuses.svelte | 4 ++-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/packages/core/src/client.ts b/packages/core/src/client.ts index 8075096445..e99281dd03 100644 --- a/packages/core/src/client.ts +++ b/packages/core/src/client.ts @@ -75,13 +75,13 @@ class ClientImpl implements Client { this.hierarchy.tx(tx) await this.model.tx(tx) } - await this.conn.tx(tx) this.notify?.(tx) + await this.conn.tx(tx) } async updateFromRemote (tx: Tx): Promise { + console.log('UPDATE FROM REMOTE') if (tx.objectSpace === core.space.Model) { - console.log('update from remote') this.hierarchy.tx(tx) await this.model.tx(tx) } diff --git a/packages/query/src/index.ts b/packages/query/src/index.ts index 18d0b7cb1e..ff34b46cc1 100644 --- a/packages/query/src/index.ts +++ b/packages/query/src/index.ts @@ -83,10 +83,7 @@ export class LiveQuery extends TxProcessor implements Client { }) return () => { - console.log('queries', this.queries.length) - console.log('removing query:', this.queries.indexOf(q)) this.queries.splice(this.queries.indexOf(q), 1) - console.log('queries', this.queries.length) } } diff --git a/plugins/workbench-resources/src/components/EditStatuses.svelte b/plugins/workbench-resources/src/components/EditStatuses.svelte index 1d5b42ee26..5062e42351 100644 --- a/plugins/workbench-resources/src/components/EditStatuses.svelte +++ b/plugins/workbench-resources/src/components/EditStatuses.svelte @@ -72,12 +72,12 @@ } async function move(to: number) { - await client.updateDoc(core.class.SpaceWithStates, core.space.Model, _id, { + client.updateDoc(core.class.SpaceWithStates, core.space.Model, _id, { $pull: { states: dragState } }) - await client.updateDoc(core.class.SpaceWithStates, core.space.Model, _id, { + client.updateDoc(core.class.SpaceWithStates, core.space.Model, _id, { $push: { states: { $each: [dragState],