This commit is contained in:
🪞👃🪞 2024-06-29 14:12:21 +03:00
parent f48f17e9a4
commit 4ebecc2427
7 changed files with 107 additions and 71 deletions

View file

@ -78,7 +78,7 @@ fn add_track (state: &mut Launcher) -> Usually<bool> {
Ok(true)
}
fn delete_track (state: &mut Launcher) -> Usually<bool> {
if state.cursor.0 >= 1 {
if state.tracks.len() > 0 && state.cursor.0 >= 1 {
state.tracks.remove(state.cursor.0 - 1);
state.cursor.0 = state.cursor.0.min(state.tracks.len());
}