From c05e40188bfd5b8990856d0bce53b66411f3d732 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 7 Feb 2019 01:03:47 +0000 Subject: [PATCH] WIP2 --- doc/TODO.md | 11 ++++++++--- src/session.js | 4 ++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/doc/TODO.md b/doc/TODO.md index f7ba9b4e..3b0eace1 100644 --- a/doc/TODO.md +++ b/doc/TODO.md @@ -1,5 +1,10 @@ # Minimal thing to get working - - given an access token, a working sync loop that echoes all the messages - - allow sync to resume from storage - - \ No newline at end of file + - finish summary store + - add eventemitter + - make sync work + - store summaries + - setup editorconfig + - setup linting (also in editor) + - store timeline + - store state \ No newline at end of file diff --git a/src/session.js b/src/session.js index 515281d8..f12b25a9 100644 --- a/src/session.js +++ b/src/session.js @@ -1,11 +1,11 @@ export default class Session { - // loginData has device_id, user_id, home_server, access_token constructor(storage) { this._storage = storage; this._session = null; this._rooms = null; } // should be called before load + // loginData has device_id, user_id, home_server, access_token async setLoginData(loginData) { const txn = this._storage.readWriteTxn([this._storage.storeNames.session]); const session = {loginData}; @@ -43,7 +43,7 @@ export default class Session { applySync(syncToken, accountData, txn) { this._session.syncToken = syncToken; - txn.session.setSession(this._session); + txn.session.set(this._session); } get syncToken() {