mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-03 11:56:01 +01:00 
			
		
		
		
	refactor(client): circular dependency in fnote
This commit is contained in:
		@@ -1,7 +1,6 @@
 | 
				
			|||||||
import server from "../services/server.js";
 | 
					import server from "../services/server.js";
 | 
				
			||||||
import noteAttributeCache from "../services/note_attribute_cache.js";
 | 
					import noteAttributeCache from "../services/note_attribute_cache.js";
 | 
				
			||||||
import ws from "../services/ws.js";
 | 
					import ws from "../services/ws.js";
 | 
				
			||||||
import froca from "../services/froca.js";
 | 
					 | 
				
			||||||
import protectedSessionHolder from "../services/protected_session_holder.js";
 | 
					import protectedSessionHolder from "../services/protected_session_holder.js";
 | 
				
			||||||
import cssClassManager from "../services/css_class_manager.js";
 | 
					import cssClassManager from "../services/css_class_manager.js";
 | 
				
			||||||
import type { Froca } from "../services/froca-interface.js";
 | 
					import type { Froca } from "../services/froca-interface.js";
 | 
				
			||||||
@@ -410,8 +409,8 @@ class FNote {
 | 
				
			|||||||
        const notePaths: NotePathRecord[] = this.getAllNotePaths().map((path) => ({
 | 
					        const notePaths: NotePathRecord[] = this.getAllNotePaths().map((path) => ({
 | 
				
			||||||
            notePath: path,
 | 
					            notePath: path,
 | 
				
			||||||
            isInHoistedSubTree: isHoistedRoot || path.includes(hoistedNoteId),
 | 
					            isInHoistedSubTree: isHoistedRoot || path.includes(hoistedNoteId),
 | 
				
			||||||
            isArchived: path.some((noteId) => froca.notes[noteId].isArchived),
 | 
					            isArchived: path.some((noteId) => this.froca.notes[noteId].isArchived),
 | 
				
			||||||
            isSearch: path.some((noteId) => froca.notes[noteId].type === "search"),
 | 
					            isSearch: path.some((noteId) => this.froca.notes[noteId].type === "search"),
 | 
				
			||||||
            isHidden: path.includes("_hidden")
 | 
					            isHidden: path.includes("_hidden")
 | 
				
			||||||
        }));
 | 
					        }));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -982,7 +981,7 @@ class FNote {
 | 
				
			|||||||
                continue;
 | 
					                continue;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            const parentNote = froca.notes[parentNoteId];
 | 
					            const parentNote = this.froca.notes[parentNoteId];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if (!parentNote || parentNote.type === "search") {
 | 
					            if (!parentNote || parentNote.type === "search") {
 | 
				
			||||||
                continue;
 | 
					                continue;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user