mirror of
https://github.com/arabianq/pipewire-soundpad.git
synced 2026-06-19 12:13:32 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 78ca2ddf68 |
Generated
+112
-306
File diff suppressed because it is too large
Load Diff
+109
-343
File diff suppressed because one or more lines are too long
@@ -308,18 +308,7 @@ impl SoundpadGui {
|
|||||||
let mut read = Vec::new();
|
let mut read = Vec::new();
|
||||||
if let Ok(entries) = std::fs::read_dir(&path) {
|
if let Ok(entries) = std::fs::read_dir(&path) {
|
||||||
for entry in entries.filter_map(|e| e.ok()) {
|
for entry in entries.filter_map(|e| e.ok()) {
|
||||||
let child_path = entry.path();
|
read.push(entry.path());
|
||||||
if !child_path.is_dir()
|
|
||||||
&& !crate::gui::SUPPORTED_EXTENSIONS.contains(
|
|
||||||
&child_path
|
|
||||||
.extension()
|
|
||||||
.unwrap_or_default()
|
|
||||||
.to_str()
|
|
||||||
.unwrap_or_default(),
|
|
||||||
) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
read.push(child_path);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let sort_order = config.get_sort_order(&path);
|
let sort_order = config.get_sort_order(&path);
|
||||||
@@ -342,8 +331,17 @@ impl SoundpadGui {
|
|||||||
let search_query = search_query.trim();
|
let search_query = search_query.trim();
|
||||||
|
|
||||||
for child in children {
|
for child in children {
|
||||||
if !child.is_dir()
|
if !child.is_dir() {
|
||||||
&& !search_query.is_empty() {
|
if !crate::gui::SUPPORTED_EXTENSIONS.contains(
|
||||||
|
&child
|
||||||
|
.extension()
|
||||||
|
.unwrap_or_default()
|
||||||
|
.to_str()
|
||||||
|
.unwrap_or_default(),
|
||||||
|
) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if !search_query.is_empty() {
|
||||||
let file_name = child
|
let file_name = child
|
||||||
.file_name()
|
.file_name()
|
||||||
.unwrap_or_default()
|
.unwrap_or_default()
|
||||||
@@ -353,6 +351,7 @@ impl SoundpadGui {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Self::draw_tree_node(ui, child, config, app_state, audio_player_state, actions);
|
Self::draw_tree_node(ui, child, config, app_state, audio_player_state, actions);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user