Remove redundant if statement to avoid future bugs

pull/948/head
Konstantin Ullrich 6 years ago
parent f7d562eafe
commit 1ea0edafa9

@ -398,20 +398,16 @@
await storage.put('version', currentVersion); await storage.put('version', currentVersion);
if (newVersion) { if (newVersion) {
await window.Signal.Data.cleanupOrphanedAttachments();
window.log.info( window.log.info(
`New version detected: ${currentVersion}; previous: ${lastVersion}` `New version detected: ${currentVersion}; previous: ${lastVersion}`
); );
if ( await window.Signal.Data.cleanupOrphanedAttachments();
lastVersion &&
window.isBeforeVersion(lastVersion, 'v1.15.0-beta.5')
) {
await window.Signal.Logs.deleteAll(); await window.Signal.Logs.deleteAll();
window.restart(); window.restart();
} }
}
if (isIndexedDBPresent) { if (isIndexedDBPresent) {
await mandatoryMessageUpgrade({ upgradeMessageSchema }); await mandatoryMessageUpgrade({ upgradeMessageSchema });

Loading…
Cancel
Save