Enable initial month filter on shelf code block

This commit is contained in:
Evan Fiordeliso 2025-07-05 23:31:39 -04:00
parent f3816a4a96
commit 2df1cf4b30
2 changed files with 5 additions and 3 deletions

View File

@ -52,7 +52,7 @@
const settingsStore = createSettings(plugin); const settingsStore = createSettings(plugin);
setSettingsContext(settingsStore); setSettingsContext(settingsStore);
const metadataStore = createMetadata(plugin, settings.statusFilter); const metadataStore = createMetadata(plugin, settings.statusFilter, true);
setMetadataContext(metadataStore); setMetadataContext(metadataStore);
const designs = [ const designs = [

View File

@ -44,7 +44,8 @@ function getMetadata(
export function createMetadata( export function createMetadata(
plugin: BookTrackerPlugin, plugin: BookTrackerPlugin,
statusFilter: ReadingState = STATUS_READ statusFilter: ReadingState = STATUS_READ,
initialMonth?: boolean
): MetadataStore { ): MetadataStore {
const settingsStore = getSettingsContext(); const settingsStore = getSettingsContext();
const initialMetadata = getMetadata( const initialMetadata = getMetadata(
@ -83,7 +84,8 @@ export function createMetadata(
return moment( return moment(
f.frontmatter[settingsStore.settings.endDateProperty] f.frontmatter[settingsStore.settings.endDateProperty]
); );
} },
initialMonth
); );
return { return {