Better handle large numbers of messages in cache on startup

This commit is contained in:
Scott Nonnenberg 2018-09-28 15:51:26 -07:00
parent 102c2717cb
commit 2cfbfe477a
5 changed files with 56 additions and 21 deletions

View file

@ -939,6 +939,9 @@
},
// Not yet processed messages - for resiliency
getUnprocessedCount() {
return window.Signal.Data.getUnprocessedCount();
},
getAllUnprocessed() {
return window.Signal.Data.getAllUnprocessed();
},
@ -959,6 +962,9 @@
removeUnprocessed(id) {
return window.Signal.Data.removeUnprocessed(id, { Unprocessed });
},
removeAllUnprocessed() {
return window.Signal.Data.removeAllUnprocessed();
},
async removeAllData() {
// First the in-memory caches:
window.storage.reset(); // items store