Skip to content

Commit 9ff4e57

Browse files
committed
Merge branch 'master' into obsidian_1.1
2 parents 2ff4e5e + 32f6b7c commit 9ff4e57

File tree

6 files changed

+15
-17
lines changed

6 files changed

+15
-17
lines changed

exampleVault/Input Fields/Editor.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ editor: |-
33
test
44
55
**test**
6+
7+
# Heading
68
---
79

810
```meta-bind

exampleVault/Input Fields/Image Suggester.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
image: Other/Images/img_frozen_branch.jpg
2+
image: Other/Images/img_butterfly.webp
33
---
44

55
```meta-bind

exampleVault/Input Fields/Suggester.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
fileSuggest: "[[Other/Example Notes/Example Note with Embeds.md|Example Note with Embeds]]"
3-
suggest: option 1
2+
fileSuggest: "[[Other/Example Notes/Example Note with Image.md|Example Note with Image]]"
3+
suggest: option 2
44
---
55

66
### Simple Suggester

exampleVault/examples.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
---
2-
slider1: 1
3-
---
4-
5-
---
6-
slider1: 7
2+
slider1: 9
73
nested:
84
object: dfgdf
95
suggest: test

exampleVault/other note.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,21 @@
22
tags: test
33
title: "test test test "
44
select: option b
5-
date: Tuesday, June 21st 2022
5+
date: Friday, June 10th 2022
66
time: 19:20
77
multi-select:
88
- option a
9-
- option b
9+
- option c
1010
---
1111

1212
## This is another note
1313
This note is to test syncing to another note.
1414

1515

16+
```dataview
17+
table without id FROM #example-note
18+
```
19+
1620
### Select
1721
Select
1822
```meta-bind

src/MetadataManager.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { Internal } from '@opd-libs/opd-metadata-lib/lib/Internal';
55
import { arrayEquals, traverseObjectToParentByPath } from './utils/Utils';
66
import { traverseObjectByPath } from '@opd-libs/opd-utils-lib/lib/ObjectTraversalUtils';
77
import getMetaDataFromFileContent = Internal.getMetaDataFromFileContent;
8+
import getMetadataFromFileCache = Internal.getMetadataFromFileCache;
89

910
export interface MetadataFileCache {
1011
file: TFile;
@@ -44,17 +45,12 @@ export class MetadataManager {
4445
console.debug(`meta-bind | MetadataManager >> registered ${uuid} to newly created file cache ${file.path} -> ${metadataPath}`);
4546
const c: MetadataFileCache = {
4647
file: file,
47-
metadata: {},
48+
metadata: getMetadataFromFileCache(file, this.plugin),
4849
listeners: [{ onCacheUpdate, metadataPath, uuid }],
4950
cyclesSinceLastUpdate: 0,
5051
changed: false,
5152
};
52-
53-
this.plugin.app.vault.cachedRead(file).then(value => {
54-
c.metadata = getMetaDataFromFileContent(value) ?? {};
55-
console.log(`meta-bind | MetadataManager >> loaded metadata for file ${file.path}`, c.metadata);
56-
this.notifyListeners(c);
57-
});
53+
console.log(`meta-bind | MetadataManager >> loaded metadata for file ${file.path}`, c.metadata);
5854

5955
this.cache.push(c);
6056
return c;

0 commit comments

Comments
 (0)