add_to_install_list

Function add_to_install_list 

Source
pub fn add_to_install_list(app: &mut AppState, item: PackageItem)
Expand description

What: Add a PackageItem to the install list if it is not already present.

Inputs:

  • app: Mutable application state (install_list and selection)
  • item: Package to add

Output:

  • Inserts at the front on success, marks list dirty, and selects index 0; no-op on dedup.

Details:

  • Updates last_install_change to support UI throttling of follow-up actions.
  • Uses HashSet for O(1) membership checking instead of linear scan.