Remove unused code and fix compiler warnings
Some checks failed
Build and Release / build-and-release (push) Failing after 1m22s

This commit is contained in:
Christoffer Martinsson 2025-12-06 14:43:29 +01:00
parent b535d0e9cb
commit 7b20b121d9
3 changed files with 0 additions and 45 deletions

View File

@ -130,11 +130,6 @@ impl Player {
Ok(())
}
pub fn stop(&mut self) -> Result<()> {
self.send_command("stop", &[])?;
self.is_idle = true;
Ok(())
}
pub fn set_volume(&mut self, volume: i64) -> Result<()> {
self.send_command("set_property", &[json!("volume"), json!(volume)])?;
@ -179,10 +174,6 @@ impl Player {
Some(self.duration)
}
pub fn is_playing(&self) -> bool {
!self.is_paused && !self.is_idle
}
pub fn is_idle(&self) -> bool {
self.is_idle
}

View File

@ -39,7 +39,6 @@ pub struct AppState {
pub struct FlattenedItem {
pub node: FileTreeNode,
pub depth: usize,
pub is_expanded: bool,
}
impl AppState {
@ -120,20 +119,6 @@ impl AppState {
self.flattened_items.get(self.selected_index)
}
pub fn toggle_expand(&mut self) {
if let Some(item) = self.get_selected_item() {
if item.node.is_dir {
let path = item.node.path.clone();
if self.expanded_dirs.contains(&path) {
self.expanded_dirs.remove(&path);
} else {
self.expanded_dirs.insert(path);
}
self.rebuild_flattened_items();
}
}
}
pub fn collapse_selected(&mut self) {
if let Some(item) = self.get_selected_item() {
if item.node.is_dir {
@ -167,10 +152,6 @@ impl AppState {
}
}
pub fn clear_marks(&mut self) {
self.marked_files.clear();
}
pub fn clear_playlist(&mut self) {
self.playlist.clear();
self.playlist_index = 0;
@ -469,7 +450,6 @@ fn flatten_tree(nodes: &[FileTreeNode], depth: usize, expanded_dirs: &HashSet<Pa
result.push(FlattenedItem {
node: node.clone(),
depth,
is_expanded,
});
if node.is_dir && !node.children.is_empty() && is_expanded {

View File

@ -34,19 +34,7 @@ impl Theme {
Color::Rgb(215, 175, 95) // #d7af5f
}
pub fn normal_red() -> Color {
Color::Rgb(215, 84, 0) // #d75400
}
pub fn normal_cyan() -> Color {
Color::Rgb(160, 160, 160) // #a0a0a0
}
// Semantic mappings
pub fn primary_text() -> Color {
Color::Rgb(238, 238, 238) // #eeeeee
}
pub fn secondary_text() -> Color {
Self::foreground()
}
@ -75,10 +63,6 @@ impl Theme {
Self::normal_yellow()
}
pub fn error() -> Color {
Self::normal_red()
}
// Styles
pub fn widget_border_style() -> Style {
Style::default().fg(Self::border()).bg(Self::background())