Refresh

Summary

Update note metadata. Happens whenever notes change (eg. write/delete/edit)

Lifecycle

Init

refreshNotesV2(noteChangeEntries) {
	noteChangeEntries.forEach ent => {
			id, note, status := ent
			switch status {
				case "delete":
					delete ...
				else {
					refreshNoteLinksAndAnchors
					@notes[ent] = note
				}
			}

	}

}
refreshNoteLinksAndAnchors(note) {
	// get all links in note
	links = findLinks(note)
	linkCandidates := findLinkCandidates(note)
	anchors = findAnchors

	note.links = links
	note.anchors = anchors
}

Reference

Cook

Past Tasks


Backlinks