diff --git a/src/main.rs b/src/main.rs index f47b9e0..29557d6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1068,6 +1068,45 @@ fn handle_key(app: &mut App, code: KeyCode) { // downloads focus overrides normal navigation // downloads focus overrides normal navigation +/* //come back + let mut handled_by_downloads = false; + + if app.downloads_focus { + if let Some(dm) = &app.downloads { + let idx = app.downloads_selected; + + if idx == 0 { + dm.send(downloads::DownloadCommand::Cancel { index: 0 }); + app.status = "download: cancel active".into(); + } else { + dm.send(downloads::DownloadCommand::RemoveQueued { index: idx }); + app.status = "download: removed".into(); + } + + // Clamp selection immediately to avoid focus navigation glitches + let len = dm + .state + .lock() + .ok() + .map(|st| st.queue.len()) + .unwrap_or(0); + + if len == 0 { + app.downloads_selected = 0; + } else if app.downloads_selected >= len { + app.downloads_selected = len - 1; + } + } else { + app.status = "downloads not available".into(); + } + return; + } + + // If downloads handled the key, skip normal navigation handling + if handled_by_downloads { + return; + } +*/ match code { KeyCode::Char('d') => { @@ -3479,6 +3518,7 @@ fn categories_for_mode(offline: bool) -> Vec { if offline { vec![ "Downloaded".into(), + "Settings".into(), ] } else { vec![ @@ -3490,6 +3530,7 @@ fn categories_for_mode(offline: bool) -> Vec { "Libraries".into(), "Continue Watching".into(), "Recently Added".into(), + "Settings".into(), ] } }