diff --git a/src/store/indexeddb-local-backend.js b/src/store/indexeddb-local-backend.js index 0f4010d3c..8d2cfcafe 100644 --- a/src/store/indexeddb-local-backend.js +++ b/src/store/indexeddb-local-backend.js @@ -133,13 +133,15 @@ LocalIndexedDBStoreBackend.prototype = { this.db.onversionchange = () => { this.db.close(); }; + + return this._init(); }); }, /** * Having connected, load initial data from the database and prepare for use */ - init: function() { + _init: function() { return q.all([ this._loadAccountData(), this._loadSyncData(), diff --git a/src/store/indexeddb-remote-backend.js b/src/store/indexeddb-remote-backend.js index 4daa60814..bedc6c463 100644 --- a/src/store/indexeddb-remote-backend.js +++ b/src/store/indexeddb-remote-backend.js @@ -55,13 +55,6 @@ RemoteIndexedDBStoreBackend.prototype = { }); }, - /** - * Having connected, load initial data from the database and prepare for use - */ - init: function() { - return this._doCmd('init'); - }, - /** * Clear the entire database. This should be used when logging out of a client * to prevent mixing data between accounts. diff --git a/src/store/indexeddb-store-worker.js b/src/store/indexeddb-store-worker.js index 725c6c91b..3212c3bfc 100644 --- a/src/store/indexeddb-store-worker.js +++ b/src/store/indexeddb-store-worker.js @@ -66,9 +66,6 @@ class IndexedDBStoreWorker { case 'connect': prom = this.backend.connect(); break; - case 'init': - prom = this.backend.init(); - break; case 'clearDatabase': prom = this.backend.clearDatabase().then((result) => { // This returns special classes which can't be cloned diff --git a/src/store/indexeddb.js b/src/store/indexeddb.js index 50f816426..a1baaeeb7 100644 --- a/src/store/indexeddb.js +++ b/src/store/indexeddb.js @@ -109,8 +109,6 @@ IndexedDBStore.prototype.startup = function() { } return this.backend.connect().then(() => { - return this.backend.init(); - }).then(() => { return this.backend.getUserPresenceEvents(); }).then((userPresenceEvents) => { userPresenceEvents.forEach(([userId, rawEvent]) => {