Automatically clean up old debug info, remove unneeded field

pull/1/head
Scott Nonnenberg 7 years ago
parent 2384988b0a
commit d5d6cdb250

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

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

Loading…
Cancel
Save