Insert parent-children views into the folder. when only insert one view, user [Self::insert_view] instead.
(&mut self, views: Vec<ParentChildViews>, uid: i64)
| 1153 | /// Insert parent-children views into the folder. |
| 1154 | /// when only insert one view, user [Self::insert_view] instead. |
| 1155 | pub fn insert_nested_views(&mut self, views: Vec<ParentChildViews>, uid: i64) { |
| 1156 | let views = FlattedViews::flatten_views(views); |
| 1157 | let mut txn = self.collab.transact_mut(); |
| 1158 | for view in views { |
| 1159 | self.body.views.insert(&mut txn, view, None, uid); |
| 1160 | } |
| 1161 | } |
| 1162 | |
| 1163 | /// Get a view by id. When uid is provided, includes user-specific data like is_favorite. |
| 1164 | /// When uid is None, returns base view data without user-specific enrichment. |