Skip attachment migration for new users

pull/1/head
Daniel Gasienica 7 years ago
parent 6671228028
commit 50a0048bf2

@ -133,7 +133,6 @@
first = false; first = false;
ConversationController.load().then(start, start); ConversationController.load().then(start, start);
idleDetector.start();
}); });
Whisper.events.on('shutdown', function() { Whisper.events.on('shutdown', function() {
@ -413,6 +412,16 @@
} }
} }
storage.onready(async () => {
const shouldSkipAttachmentMigrationForNewUsers = firstRun === true;
if (shouldSkipAttachmentMigrationForNewUsers) {
const database = Migrations0DatabaseWithAttachmentData.getDatabase();
const connection =
await Signal.Database.open(database.name, database.version);
await Signal.Settings.markAttachmentMigrationComplete(connection);
}
idleDetector.start();
});
} }
/* eslint-disable */ /* eslint-disable */

Loading…
Cancel
Save