1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-08-09 10:22:46 +03:00

Informative logging given it won't be spammy

This commit is contained in:
Kegan Dougal
2017-02-17 11:14:02 +00:00
parent 5aa146f0a6
commit 8220fad855

View File

@@ -83,6 +83,7 @@ IndexedDBStoreBackend.prototype = {
* @return {Promise} Resolved when the database is cleared.
*/
clearDatabase: function() {
console.log("Removing indexeddb instance: ", this._dbName);
return promiseifyRequest(this.indexedDB.deleteDatabase(this._dbName));
},
@@ -297,7 +298,11 @@ IndexedDBStore.prototype.getSyncAccumulator = function() {
*/
IndexedDBStore.prototype.deleteAllData = function() {
MatrixInMemoryStore.prototype.deleteAllData.call(this);
this.backend.clearDatabase();
this.backend.clearDatabase().then(() => {
console.log("Deleted indexeddb data.");
}, (err) => {
console.error("Failed to delete indexeddb data: ", err);
});
};
/**