exclude hidden directories in browser

This commit is contained in:
krolxon 2024-05-12 21:10:28 +05:30
parent 98cfe4eb26
commit 51a3094d87
2 changed files with 2 additions and 2 deletions

View File

@ -50,7 +50,7 @@ impl FileBrowser {
let mut file_vec: Vec<(String, String)> = vec![];
let mut dir_vec: Vec<(String, String)> = vec![];
for (t, f) in conn.conn.listfiles(self.path.as_str())?.into_iter() {
if t == "directory" {
if t == "directory" && !f.starts_with(".") {
dir_vec.push((t, f));
} else if t == "file"
&& Path::new(&f).has_extension(&[

View File

@ -301,7 +301,7 @@ fn draw_progress_bar(frame: &mut Frame, app: &mut App, size: Rect) {
// Define the title
let title = Block::default()
.title(Title::from(state.red().bold()))
.title(Title::from(song.green().bold()))
.title(Title::from(song.green()))
.title(Title::from(duration.cyan().bold()).alignment(Alignment::Right))
.title(Title::from(modes_bottom).position(block::Position::Bottom))
.borders(Borders::ALL);