1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-12-02 22:49:09 +02:00

Mobile: Fixes #1066: Disable use of FTS when not present on device

This commit is contained in:
Laurent Cozic
2018-12-28 21:40:29 +01:00
parent 59402cf198
commit 53513db5b5
8 changed files with 81 additions and 24 deletions

View File

@@ -417,7 +417,13 @@ async function initialize(dispatch) {
if (!locale) locale = defaultLocale();
Setting.setValue('locale', closestSupportedLocale(locale));
if (Setting.value('env') === 'dev') Setting.setValue('sync.target', SyncTargetRegistry.nameToId('onedrive_dev'));
Setting.setValue('firstStart', 0)
Setting.setValue('firstStart', 0);
}
if (Setting.value('db.ftsEnabled') === -1) {
const ftsEnabled = await db.ftsEnabled();
Setting.setValue('db.ftsEnabled', ftsEnabled ? 1 : 0);
reg.logger().info('db.ftsEnabled = ', Setting.value('db.ftsEnabled'));
}
reg.logger().info('Sync target: ' + Setting.value('sync.target'));
@@ -481,6 +487,7 @@ async function initialize(dispatch) {
});
}
} catch (error) {
alert('Initialization error: ' + error.message);
reg.logger().error('Initialization error:', error);
}