revert backup
This commit is contained in:
2026-02-17 05:31:22 +00:00
parent 8c97c2911c
commit 6419126982

View File

@@ -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<String> {
if offline {
vec![
"Downloaded".into(),
"Settings".into(),
]
} else {
vec![
@@ -3490,6 +3530,7 @@ fn categories_for_mode(offline: bool) -> Vec<String> {
"Libraries".into(),
"Continue Watching".into(),
"Recently Added".into(),
"Settings".into(),
]
}
}