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
+2 -1
View File
@@ -1190,7 +1190,8 @@ impl<'a, 'b> Network<'a, 'b> {
.await;
self
.handle_request::<(), Vec<Movie>>(request_props, |movie_vec, mut app| {
.handle_request::<(), Vec<Movie>>(request_props, |mut movie_vec, mut app| {
movie_vec.sort_by(|a, b| a.id.cmp(&b.id));
app.data.radarr_data.movies.set_items(movie_vec);
app.data.radarr_data.movies.apply_sorting_toggle(false);
})