Always persist last version when deleting configuration

This commit is contained in:
Scott Nonnenberg 2024-02-06 18:52:44 -08:00 committed by GitHub
parent 748cb1abc8
commit 5bd287e707
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 2 deletions

View file

@ -2911,7 +2911,6 @@ export async function startApp(): Promise<void> {
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<void> {
} 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();

View file

@ -44,5 +44,6 @@ export const STORAGE_UI_KEYS: ReadonlyArray<keyof StorageAccessType> = [
'system-tray-setting',
'textFormatting',
'theme-setting',
'version',
'zoomFactor',
];