remove Settings tab

This commit is contained in:
Kristofers Solo 2023-11-21 12:35:55 +02:00
parent f8f1fc3bb6
commit 695a0c3b27
3 changed files with 1 additions and 5 deletions

View File

@ -22,7 +22,7 @@ impl<'a> App<'a> {
pub fn new() -> Self {
Self {
running: true,
tabs: &[Tab::All, Tab::Active, Tab::Downloading, Tab::Settings],
tabs: &[Tab::All, Tab::Active, Tab::Downloading],
index: 0,
state: TableState::default(),
torrents: Torrents::new(),

View File

@ -8,7 +8,6 @@ pub enum Tab {
All,
Active,
Downloading,
Settings,
}
impl Tab {
@ -45,7 +44,6 @@ impl Tab {
TorrentGetField::DownloadDir,
TorrentGetField::Name,
],
Tab::Settings => &[],
}
}
}
@ -56,7 +54,6 @@ impl ToString for Tab {
Tab::All => String::from("All"),
Tab::Active => String::from("Active"),
Tab::Downloading => String::from("Downloading"),
Tab::Settings => String::from("Settings"),
}
}
}

View File

@ -93,7 +93,6 @@ pub fn render<'a, B: Backend>(app: &mut App, frame: &mut Frame<'_, B>) {
0 => render_table(app, Tab::All),
1 => render_table(app, Tab::Active),
2 => render_table(app, Tab::Downloading),
3 => render_table(app, Tab::Settings),
_ => unreachable!(),
};
frame.render_stateful_widget(inner.widths(widths.as_ref()), chunks[1], &mut app.state)