From 1ea0edafa9c03c2b32bfc8fd1c1a0e4fdb0d8f50 Mon Sep 17 00:00:00 2001 From: Konstantin Ullrich Date: Wed, 4 Mar 2020 23:15:25 +0100 Subject: [PATCH] Remove redundant if statement to avoid future bugs --- js/background.js | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/js/background.js b/js/background.js index 3ff691d57..c9cb76bc9 100644 --- a/js/background.js +++ b/js/background.js @@ -398,19 +398,15 @@ await storage.put('version', currentVersion); if (newVersion) { - await window.Signal.Data.cleanupOrphanedAttachments(); - window.log.info( `New version detected: ${currentVersion}; previous: ${lastVersion}` ); - if ( - lastVersion && - window.isBeforeVersion(lastVersion, 'v1.15.0-beta.5') - ) { - await window.Signal.Logs.deleteAll(); - window.restart(); - } + await window.Signal.Data.cleanupOrphanedAttachments(); + + await window.Signal.Logs.deleteAll(); + + window.restart(); } if (isIndexedDBPresent) {