release v1.10.0: compact English calendar and remove recent type filters

This commit is contained in:
olivier committed 2026-11-11 21:58:50 -05:00
1 parent c9afc16c53
commit 165a3d1f27
11 files changed
+42 -122

No files matched your search

+6 -4
View File
@@ -285,13 +285,15 @@ export default class WaypointPlugin extends Plugin {
const s = (saved?.settings || {}) as Partial<WaypointSettings>;
this.settings = Object.assign({}, DEFAULT_SETTINGS, s);
this.settings.recentFiles = Object.assign({}, DEFAULT_SETTINGS.recentFiles, s.recentFiles || {});
// `filterTags` (pill names only) became `types` (name + icon), and the
// single `updateOn` mode became the header filter `show`.
const legacyRecent = this.settings.recentFiles as Partial<{ filterTags: string[]; updateOn: string }>;
// Drop keys of removed features: the old type filter (`filterTags`,
// then `showTypeFilter`) and the single `updateOn` mode, now the header
// filter `show`.
const legacyRecent = this.settings.recentFiles as Partial<{ filterTags: string[]; showTypeFilter: boolean; updateOn: string }>;
this.settings.recentFiles.types = Array.isArray(s.recentFiles?.types)
? s.recentFiles.types.map(t => ({ ...t }))
: (legacyRecent.filterTags ?? []).map(type => ({ type, icon: '' }));
: [];
delete legacyRecent.filterTags;
delete legacyRecent.showTypeFilter;
delete legacyRecent.updateOn;
this.settings.calendar = Object.assign({}, DEFAULT_SETTINGS.calendar, s.calendar || {});
this.settings.display = Object.assign({}, DEFAULT_SETTINGS.display, s.display || {});