mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-16 05:13:06 +00:00
a strange fix
Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
parent
64b5e14208
commit
479fb21600
@ -75,13 +75,13 @@ class ClientImpl implements Client {
|
|||||||
this.hierarchy.tx(tx)
|
this.hierarchy.tx(tx)
|
||||||
await this.model.tx(tx)
|
await this.model.tx(tx)
|
||||||
}
|
}
|
||||||
await this.conn.tx(tx)
|
|
||||||
this.notify?.(tx)
|
this.notify?.(tx)
|
||||||
|
await this.conn.tx(tx)
|
||||||
}
|
}
|
||||||
|
|
||||||
async updateFromRemote (tx: Tx): Promise<void> {
|
async updateFromRemote (tx: Tx): Promise<void> {
|
||||||
|
console.log('UPDATE FROM REMOTE')
|
||||||
if (tx.objectSpace === core.space.Model) {
|
if (tx.objectSpace === core.space.Model) {
|
||||||
console.log('update from remote')
|
|
||||||
this.hierarchy.tx(tx)
|
this.hierarchy.tx(tx)
|
||||||
await this.model.tx(tx)
|
await this.model.tx(tx)
|
||||||
}
|
}
|
||||||
|
@ -83,10 +83,7 @@ export class LiveQuery extends TxProcessor implements Client {
|
|||||||
})
|
})
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
console.log('queries', this.queries.length)
|
|
||||||
console.log('removing query:', this.queries.indexOf(q))
|
|
||||||
this.queries.splice(this.queries.indexOf(q), 1)
|
this.queries.splice(this.queries.indexOf(q), 1)
|
||||||
console.log('queries', this.queries.length)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,12 +72,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function move(to: number) {
|
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: {
|
$pull: {
|
||||||
states: dragState
|
states: dragState
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
await client.updateDoc(core.class.SpaceWithStates, core.space.Model, _id, {
|
client.updateDoc(core.class.SpaceWithStates, core.space.Model, _id, {
|
||||||
$push: {
|
$push: {
|
||||||
states: {
|
states: {
|
||||||
$each: [dragState],
|
$each: [dragState],
|
||||||
|
Loading…
Reference in New Issue
Block a user