mirror of
https://github.com/arabianq/pipewire-soundpad.git
synced 2026-06-19 12:13:32 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b824c88d01 | |||
| a36a82a276 | |||
| 426056e85e |
Generated
+306
-112
File diff suppressed because it is too large
Load Diff
+343
-109
File diff suppressed because one or more lines are too long
@@ -308,7 +308,18 @@ 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()) {
|
||||||
read.push(entry.path());
|
let child_path = 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);
|
||||||
@@ -331,17 +342,8 @@ 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()
|
||||||
if !crate::gui::SUPPORTED_EXTENSIONS.contains(
|
&& !search_query.is_empty() {
|
||||||
&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()
|
||||||
@@ -351,7 +353,6 @@ 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