diff --git a/src/storage/idb/stores/session.js b/src/storage/idb/stores/session.js index 2f9bfa15..1ebd6020 100644 --- a/src/storage/idb/stores/session.js +++ b/src/storage/idb/stores/session.js @@ -1,13 +1,33 @@ +/** +store contains: + loginData { + device_id + home_server + access_token + user_id + } + // flags { + // lazyLoading? + // } + syncToken + displayName + avatarUrl + lastSynced +*/ class SessionStore { - constructor(session, db) { - this._db = new Database(db); + constructor(sessionStore) { + this._sessionStore = sessionStore; } - get session() { + readSession() { return this._session; } + writeSession(session) { + + } + // or dedicated set sync_token method? async setAvatar(avatar) {