generated from tpl/obsidian-sample-plugin
			Enable initial month filter on shelf code block
This commit is contained in:
		
							parent
							
								
									f3816a4a96
								
							
						
					
					
						commit
						2df1cf4b30
					
				| 
						 | 
					@ -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 = [
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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 {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue