diff --git a/src/main.ts b/src/main.ts index 8bbd097..67fd471 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,4 +1,5 @@ import { Item } from '@omnivore-app/api' +import { DateTime } from 'luxon' import { addIcon, normalizePath, @@ -17,7 +18,9 @@ import { renderFilename, renderItemContent, } from './settings/template' +import { OmnivoreSettingTab } from './settingsTab' import { + DATE_FORMAT, findFrontMatterIndex, getQueryFromFilter, parseDateTime, @@ -27,7 +30,6 @@ import { replaceIllegalCharsFolder, setOrUpdateHighlightColors, } from './util' -import { OmnivoreSettingTab } from './settingsTab' export default class OmnivorePlugin extends Plugin { settings: OmnivoreSettings @@ -396,6 +398,10 @@ export default class OmnivorePlugin extends Plugin { } } + manualSync && new Notice('🎉 Sync completed') + + this.settings.syncAt = DateTime.local().toFormat(DATE_FORMAT) + if (!hasNextPage) { break } @@ -406,7 +412,6 @@ export default class OmnivorePlugin extends Plugin { } finally { this.settings.syncing = false await this.saveSettings() - manualSync && new Notice('🎉 Sync completed') } }