Fixed a small bug with sorting the main library table. On refreshes it would reset the data and because of stable sorts, the data would change. Fixed by pre-sorting everything by ID as it is naturally when coming from Radarr prior to any subsequent sorts.

This commit is contained in:
2024-02-14 12:53:21 -07:00
parent 6cd24be5e4
commit cf14483338
4 changed files with 52 additions and 5 deletions
@@ -267,6 +267,13 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveRadarrBlock> for LibraryHandler<'a, '
self.app.pop_navigation_stack();
}
ActiveRadarrBlock::MoviesSortPrompt => {
self
.app
.data
.radarr_data
.movies
.items
.sort_by(|a, b| a.id.cmp(&b.id));
self.app.data.radarr_data.movies.apply_sorting();
self.app.pop_navigation_stack();