diff options
author | usodhi <61431818+usodhi@users.noreply.github.com> | 2020-07-29 23:42:36 +0530 |
---|---|---|
committer | usodhi <61431818+usodhi@users.noreply.github.com> | 2020-07-29 23:42:36 +0530 |
commit | 188d9053edbc165e14a4e98124aad0525dd2a28e (patch) | |
tree | 35c53a34c88683241dc179cc33c40770a3e1e6a7 /src/client/DocServer.ts | |
parent | 2fb042f575626cc6f938eec57c8e71e45ff6b1d5 (diff) | |
parent | 364da51465e05404479cb5682d2e2043e6855b23 (diff) |
fixed merge conflicts
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; |