save_sort_mode

Function save_sort_mode 

Source
pub fn save_sort_mode(sm: SortMode)
Expand description

What: Persist the user-selected sort mode into settings.conf (or legacy pacsea.conf).

Inputs:

  • sm: Sort mode chosen in the UI, expressed as crate::state::SortMode.

Output:

  • None.

Details:

  • Ensures the target file exists by seeding from the skeleton when missing.
  • Replaces existing sort_mode/results_sort entries while preserving comments.