refactor(content): keep installed sorting file-based

This commit is contained in:
objz committed 2026-09-24 18:39:29 +02:00
1 parent 8c7bbb9a79
commit dcefb3b7ba
9 files changed
+56 -215

No files matched your search

+5 -9
View File
@@ -352,17 +352,13 @@ fn installed_sort_panel_has_local_fields_and_direction() {
handle_key(&KeyEvent::from(KeyCode::Enter), &mut state);
assert_eq!(state.local_sort_index, 6);
assert!(!state.local_sort_descending);
for _ in 0..3 {
handle_key(&KeyEvent::from(KeyCode::Char('k')), &mut state);
}
handle_key(&KeyEvent::from(KeyCode::Enter), &mut state);
assert_eq!(state.local_ranking_index, 3);
assert_eq!(state.local_sort_index, 6);
handle_key(&KeyEvent::from(KeyCode::Char('j')), &mut state);
handle_key(&KeyEvent::from(KeyCode::Char('j')), &mut state);
assert_eq!(state.sort_panel_selected, 2);
handle_key(&KeyEvent::from(KeyCode::Char('r')), &mut state);
assert_eq!(state.local_sort_index, 5);
assert_eq!(state.local_ranking_index, 0);
handle_key(&KeyEvent::from(KeyCode::Char('j')), &mut state);
handle_key(&KeyEvent::from(KeyCode::Char('j')), &mut state);
handle_key(&KeyEvent::from(KeyCode::Char('k')), &mut state);
handle_key(&KeyEvent::from(KeyCode::Char('k')), &mut state);
handle_key(&KeyEvent::from(KeyCode::Enter), &mut state);
assert_eq!(state.local_sort_index, 5);
assert!(state.local_sort_descending);