mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 13:39:01 +01:00 
			
		
		
		
	fix for moving note inside not-yet folder
This commit is contained in:
		
							parent
							
								
									37995f1ce5
								
							
						
					
					
						commit
						ae6e222c50
					
				@ -51,12 +51,16 @@ const treeChanges = (function() {
 | 
				
			|||||||
            changeNode(nodeToMove, node => {
 | 
					            changeNode(nodeToMove, node => {
 | 
				
			||||||
                // first expand which will force lazy load and only then move the node
 | 
					                // first expand which will force lazy load and only then move the node
 | 
				
			||||||
                // if this is not expanded before moving, then lazy load won't happen because it already contains node
 | 
					                // if this is not expanded before moving, then lazy load won't happen because it already contains node
 | 
				
			||||||
 | 
					                // this doesn't work if this isn't a folder yet, that's why we expand second time below
 | 
				
			||||||
                toNode.setExpanded(true);
 | 
					                toNode.setExpanded(true);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                node.moveTo(toNode);
 | 
					                node.moveTo(toNode);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                toNode.folder = true;
 | 
					                toNode.folder = true;
 | 
				
			||||||
                toNode.renderTitle();
 | 
					                toNode.renderTitle();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                // this expands the note in case it become the folder only after the move
 | 
				
			||||||
 | 
					                toNode.setExpanded(true);
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user