Refactored to require handlers to specify the components they rely on and to specify when they are ready. This fixes a lot of bugs with the UI when users try to press buttons while the application is still loading.

This commit is contained in:
Dark-Alex-17 committed 2024-07-17 19:55:10 -06:00
1 parent 9104b7c356
commit d84e7dfcab
49 files changed
+5143 -265

No files matched your search

@@ -41,6 +41,10 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveRadarrBlock> for EditCollectionHandle
self.key
}
fn is_ready(&self) -> bool {
!self.app.is_loading && self.app.data.radarr_data.edit_collection_modal.is_some()
}
fn handle_scroll_up(&mut self) {
match self.active_radarr_block {
ActiveRadarrBlock::EditCollectionSelectMinimumAvailability => self