Skip attachment migration for new users

This commit is contained in:
Daniel Gasienica 2018-04-30 13:53:39 -04:00
parent 6671228028
commit 50a0048bf2

View file

@ -133,7 +133,6 @@
first = false;
ConversationController.load().then(start, start);
idleDetector.start();
});
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 */