1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-18 09:35:20 +02:00
joplin/packages/lib/services/ItemChangeUtils.ts
2021-01-22 17:41:11 +00:00

12 lines
490 B
TypeScript

import Setting from '../models/Setting';
import ItemChange from '../models/ItemChange';
export default class ItemChangeUtils {
static async deleteProcessedChanges() {
const lastProcessedChangeIds = [Setting.value('resourceService.lastProcessedChangeId'), Setting.value('searchEngine.lastProcessedChangeId'), Setting.value('revisionService.lastProcessedChangeId')];
const lowestChangeId = Math.min(...lastProcessedChangeIds);
await ItemChange.deleteOldChanges(lowestChangeId);
}
}