(node: ImportedNode)
| 692 | if insert_node(&mut collection.nodes, parent_folder_id, node).is_err() { |
| 693 | return None; |
| 694 | } |
| 695 | |
| 696 | self.bump_revision(); |
| 697 | self.save_to_file(); |
| 698 | cx.emit(CollectionsEvent::NodeAdded(collection_id, node_id)); |
| 699 | cx.notify(); |
| 700 | Some(node_id) |
| 701 | } |
| 702 | |
| 703 | pub fn remove_node( |
| 704 | &mut self, |
| 705 | collection_id: Uuid, |
| 706 | node_id: Uuid, |
| 707 | cx: &mut Context<Self>, |
| 708 | ) -> bool { |
| 709 | let Some(collection) = self.collections.iter_mut().find(|c| c.id == collection_id) else { |
| 710 | return false; |
| 711 | }; |
| 712 | |
| 713 | if remove_node(&mut collection.nodes, node_id).is_none() { |
| 714 | return false; |
nothing calls this directly
no outgoing calls
no test coverage detected