Split collections_ui::wire into one function per section
The 1,457-line wire() registered every collections-sidebar and grid-drag callback in one function, sectioned only by comment. Lift each section into its own fn: wire_selection (split further into wire_selection and wire_selection_filing, since the original section ran to 375 lines), wire_drag, wire_trash, wire_trash_from_grid, wire_tree_navigation, wire_create, wire_rename, wire_remove, wire_row_drag (the tree row's own hold-drag, which the original "remove" comment's span covered but which is really a separate feature), wire_row_menu, and wire_membership. wire() itself now just coerces the shared closures to trait objects and calls each in the original order. visible_ids is coerced to Rc<dyn Fn() -> Vec<ImageId>> at the top, alongside on_scope_changed and session, so the new functions take plain trait objects instead of threading a generic parameter through every one of them.
This commit is contained in:
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user