From 5bd287e7071fb28c2ca83de4b51fc3f0d49ff55a Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Tue, 6 Feb 2024 18:52:44 -0800 Subject: [PATCH] Always persist last version when deleting configuration --- ts/background.ts | 2 -- ts/types/StorageUIKeys.ts | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/ts/background.ts b/ts/background.ts index 26283fee55df..879771ec8057 100644 --- a/ts/background.ts +++ b/ts/background.ts @@ -2911,7 +2911,6 @@ export async function startApp(): Promise { const NUMBER_ID_KEY = 'number_id'; const UUID_ID_KEY = 'uuid_id'; const PNI_KEY = 'pni'; - const VERSION_KEY = 'version'; const LAST_PROCESSED_INDEX_KEY = 'attachmentMigration_lastProcessedIndex'; const IS_MIGRATION_COMPLETE_KEY = 'attachmentMigration_isComplete'; @@ -2968,7 +2967,6 @@ export async function startApp(): Promise { } else { await window.textsecure.storage.remove(LAST_PROCESSED_INDEX_KEY); } - await window.textsecure.storage.put(VERSION_KEY, window.getVersion()); // Re-hydrate items from memory; removeAllConfiguration above changed database await window.storage.fetch(); diff --git a/ts/types/StorageUIKeys.ts b/ts/types/StorageUIKeys.ts index a4ab8e5e7b40..5ddc6863a9f5 100644 --- a/ts/types/StorageUIKeys.ts +++ b/ts/types/StorageUIKeys.ts @@ -44,5 +44,6 @@ export const STORAGE_UI_KEYS: ReadonlyArray = [ 'system-tray-setting', 'textFormatting', 'theme-setting', + 'version', 'zoomFactor', ];