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);
 | 
			
		||||
	setSettingsContext(settingsStore);
 | 
			
		||||
 | 
			
		||||
	const metadataStore = createMetadata(plugin, settings.statusFilter);
 | 
			
		||||
	const metadataStore = createMetadata(plugin, settings.statusFilter, true);
 | 
			
		||||
	setMetadataContext(metadataStore);
 | 
			
		||||
 | 
			
		||||
	const designs = [
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -44,7 +44,8 @@ function getMetadata(
 | 
			
		|||
 | 
			
		||||
export function createMetadata(
 | 
			
		||||
	plugin: BookTrackerPlugin,
 | 
			
		||||
	statusFilter: ReadingState = STATUS_READ
 | 
			
		||||
	statusFilter: ReadingState = STATUS_READ,
 | 
			
		||||
	initialMonth?: boolean
 | 
			
		||||
): MetadataStore {
 | 
			
		||||
	const settingsStore = getSettingsContext();
 | 
			
		||||
	const initialMetadata = getMetadata(
 | 
			
		||||
| 
						 | 
				
			
			@ -83,7 +84,8 @@ export function createMetadata(
 | 
			
		|||
			return moment(
 | 
			
		||||
				f.frontmatter[settingsStore.settings.endDateProperty]
 | 
			
		||||
			);
 | 
			
		||||
		}
 | 
			
		||||
		},
 | 
			
		||||
		initialMonth
 | 
			
		||||
	);
 | 
			
		||||
 | 
			
		||||
	return {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue