You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-29 22:48:10 +02:00
More fixes to search engine and better handling of non-ASCII searches
This commit is contained in:
18
ReactNativeClient/lib/services/ItemChangeUtils.js
Normal file
18
ReactNativeClient/lib/services/ItemChangeUtils.js
Normal file
@@ -0,0 +1,18 @@
|
||||
const Setting = require('lib/models/Setting');
|
||||
const ItemChange = require('lib/models/ItemChange');
|
||||
|
||||
class ItemChangeUtils {
|
||||
|
||||
static async deleteProcessedChanges() {
|
||||
const lastProcessedChangeIds = [
|
||||
Setting.value('resourceService.lastProcessedChangeId'),
|
||||
Setting.value('searchEngine.lastProcessedChangeId'),
|
||||
];
|
||||
|
||||
const lowestChangeId = Math.min(...lastProcessedChangeIds);
|
||||
await ItemChange.deleteOldChanges(lowestChangeId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = ItemChangeUtils;
|
||||
Reference in New Issue
Block a user