diff options
author | anika-ahluwalia <anika.ahluwalia@gmail.com> | 2020-07-29 23:18:10 -0500 |
---|---|---|
committer | anika-ahluwalia <anika.ahluwalia@gmail.com> | 2020-07-29 23:18:10 -0500 |
commit | 87d62f76f0ee26a17779c099ef43aba3f347cb03 (patch) | |
tree | 2ae6c4929c473ed23a0088e4e6b02fba424bcf3f /src/client/DocServer.ts | |
parent | 4224ebd13aec9e01f1fe73c935c40adb089dbc69 (diff) | |
parent | c25e942ea7b015ef163ebb772c268479cc976234 (diff) |
merge
Diffstat (limited to 'src/client/DocServer.ts')
-rw-r--r-- | src/client/DocServer.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/DocServer.ts b/src/client/DocServer.ts index 8ded43468..dec8724c6 100644 --- a/src/client/DocServer.ts +++ b/src/client/DocServer.ts @@ -1,6 +1,6 @@ import * as io from 'socket.io-client'; import { MessageStore, YoutubeQueryTypes, GestureContent, MobileInkOverlayContent, UpdateMobileInkOverlayPositionContent, MobileDocumentUploadContent } from "./../server/Message"; -import { Opt, Doc, fetchProto, FieldsSym } from '../fields/Doc'; +import { Opt, Doc, fetchProto, FieldsSym, UpdatingFromServer } from '../fields/Doc'; import { Utils, emptyFunction } from '../Utils'; import { SerializationHelper } from './util/SerializationHelper'; import { RefField } from '../fields/RefField'; @@ -228,6 +228,7 @@ export namespace DocServer { // deserialize const field = await SerializationHelper.Deserialize(fieldJson); if (force && field instanceof Doc && cached instanceof Doc) { + cached[UpdatingFromServer] = true; Array.from(Object.keys(field)).forEach(key => { const fieldval = field[key]; if (fieldval instanceof ObjectField) { @@ -235,6 +236,8 @@ export namespace DocServer { } cached[key] = field[key]; }); + cached[UpdatingFromServer] = false; + return cached; } else if (field !== undefined) { _cache[id] = field; |