Automatically clean up old debug info, remove unneeded field

This commit is contained in:
Scott Nonnenberg 2018-07-18 16:49:03 -07:00
parent 2384988b0a
commit d5d6cdb250
2 changed files with 7 additions and 3 deletions

View file

@ -226,13 +226,18 @@
}
});
function start() {
async function start() {
const currentVersion = window.getVersion();
const lastVersion = storage.get('version');
const newVersion = !lastVersion || currentVersion !== lastVersion;
storage.put('version', currentVersion);
await storage.put('version', currentVersion);
if (newVersion) {
if (currentVersion === '1.14.2' || currentVersion === '1.15.0-beta.2') {
await window.Signal.Logs.deleteAll();
window.restart();
}
console.log(
`New version detected: ${currentVersion}; previous: ${lastVersion}`
);

View file

@ -155,7 +155,6 @@
},
async onExpiredCollection(message) {
console.log('onExpiredCollection', message.attributes);
const removeMessage = () => {
console.log('Remove expired message from collection', {
sentAt: message.get('sent_at'),