rmptui51a3094
exclude hidden directories in browser
+2 −2
2 files changed
- M src/browser.rs +1 −1
- M src/ui.rs +1 −1
| @@ -50,7 +50,7 @@ impl FileBrowser { | |||
| 50 | 50 | let mut file_vec: Vec<(String, String)> = vec![]; | |
| 51 | 51 | let mut dir_vec: Vec<(String, String)> = vec![]; | |
| 52 | 52 | for (t, f) in conn.conn.listfiles(self.path.as_str())?.into_iter() { | |
| 53 | − | if t == "directory" { | |
| 53 | + | if t == "directory" && !f.starts_with(".") { | |
| 54 | 54 | dir_vec.push((t, f)); | |
| 55 | 55 | } else if t == "file" | |
| 56 | 56 | && Path::new(&f).has_extension(&[ | |
| @@ -301,7 +301,7 @@ fn draw_progress_bar(frame: &mut Frame, app: &mut App, size: Rect) { | |||
| 301 | 301 | // Define the title | |
| 302 | 302 | let title = Block::default() | |
| 303 | 303 | .title(Title::from(state.red().bold())) | |
| 304 | − | .title(Title::from(song.green().bold())) | |
| 304 | + | .title(Title::from(song.green())) | |
| 305 | 305 | .title(Title::from(duration.cyan().bold()).alignment(Alignment::Right)) | |
| 306 | 306 | .title(Title::from(modes_bottom).position(block::Position::Bottom)) | |
| 307 | 307 | .borders(Borders::ALL); | |