diff options
author | bobzel <zzzman@gmail.com> | 2020-10-08 19:54:52 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2020-10-08 19:54:52 -0400 |
commit | c63d7ab902135165eaafc89bcea15805ff10f11b (patch) | |
tree | 7831cfc1fc726b51c7f40803ea2d20173f43986b /src/client/DocServer.ts | |
parent | 3fe20d8730cf0d18fa18956105ee92cf434b6350 (diff) |
load entire DB in one message.
Diffstat (limited to 'src/client/DocServer.ts')
-rw-r--r-- | src/client/DocServer.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/client/DocServer.ts b/src/client/DocServer.ts index 9683eab45..d936f6e2a 100644 --- a/src/client/DocServer.ts +++ b/src/client/DocServer.ts @@ -10,6 +10,7 @@ import MobileInkOverlay from '../mobile/MobileInkOverlay'; import { runInAction } from 'mobx'; import { ObjectField } from '../fields/ObjectField'; import { StrCast } from '../fields/Types'; +import * as rp from 'request-promise'; /** * This class encapsulates the transfer and cross-client synchronization of @@ -34,6 +35,12 @@ export namespace DocServer { if (doc instanceof Doc) strings.push(StrCast(doc.author) + " " + StrCast(doc.title) + " " + StrCast(Doc.GetT(doc, "title", "string", true))); }); strings.sort().forEach((str, i) => console.log(i.toString() + " " + str)); + rp.post(Utils.prepend("/setCacheDocumentIds"), { + body: { + cacheDocumentIds: Array.from(Object.keys(_cache)).join(";"), + }, + json: true, + }); } export let _socket: SocketIOClient.Socket; // this client's distinct GUID created at initialization |