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

@@ -597,8 +597,9 @@ class NoteScreenComponent extends BaseScreenComponent {
this.saveOneProperty('body', newBody);
};
// Currently keyword highlighting is supported only when FTS is available.
let keywords = [];
if (this.props.searchQuery) {
if (this.props.searchQuery && !!this.props.ftsEnabled) {
const parsedQuery = SearchEngine.instance().parseQuery(this.props.searchQuery);
keywords = SearchEngine.instance().allParsedQueryTerms(parsedQuery);
}
@@ -769,6 +770,7 @@ const NoteScreen = connect(
folders: state.folders,
searchQuery: state.searchQuery,
theme: state.settings.theme,
ftsEnabled: state.settings['db.ftsEnabled'],
sharedData: state.sharedData,
showAdvancedOptions: state.settings.showAdvancedOptions,
};