fixed selection handler befor/after transactions

This commit is contained in:
Kevin Jahns
2017-10-28 23:02:48 +02:00
parent c619aa33d9
commit c545118637
13 changed files with 177 additions and 95 deletions

View File

@@ -1,6 +1,5 @@
import { getStruct } from '../Util/structReferences.js'
import BinaryDecoder from '../Binary/Decoder.js'
import Delete from '../Struct/Delete.js'
import { logID } from './messageToString.js'
class MissingEntry {
@@ -17,9 +16,14 @@ class MissingEntry {
* integrate.
*/
function _integrateRemoteStructHelper (y, struct) {
struct._integrate(y)
if (struct.constructor !== Delete) {
const id = struct._id
const id = struct._id
if (id === undefined) {
struct._integrate(y)
} else {
if (y.ss.getState(id.user) > id.clock) {
return
}
struct._integrate(y)
let msu = y._missingStructs.get(id.user)
if (msu != null) {
let clock = id.clock