implement some of the commented todos

This commit is contained in:
Kevin Jahns
2019-04-09 04:01:37 +02:00
parent 1b06f59d1c
commit 52ec698635
24 changed files with 233 additions and 243 deletions

View File

@@ -193,7 +193,7 @@ export const readDeleteSet = (decoder, transaction, store) => {
let struct = structs[index]
// split the first item if necessary
if (!struct.deleted && struct.id.clock < clock) {
structs.splice(index + 1, 0, struct.splitAt(store, clock - struct.id.clock))
structs.splice(index + 1, 0, struct.splitAt(clock - struct.id.clock))
index++ // increase we now want to use the next struct
}
while (index < structs.length) {
@@ -202,7 +202,7 @@ export const readDeleteSet = (decoder, transaction, store) => {
if (struct.id.clock < clock + len) {
if (!struct.deleted) {
if (clock + len < struct.id.clock + struct.length) {
structs.splice(index, 0, struct.splitAt(store, clock + len - struct.id.clock))
structs.splice(index, 0, struct.splitAt(clock + len - struct.id.clock))
}
struct.delete(transaction)
}