mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-08 06:32:35 -04:00
Added File Manager button to show hidden files (#1564)
* Add files via upload * Add files via upload * Add files via upload * Add files via upload
This commit is contained in:
parent
68f960e4e7
commit
7a87e3f3af
4 changed files with 54 additions and 1 deletions
|
@ -156,7 +156,7 @@ void FileManBaseView::load_directory_contents(const fs::path& dir_path) {
|
|||
|
||||
for (const auto& entry : fs::directory_iterator(dir_path, u"*")) {
|
||||
// Hide files starting with '.' (hidden / tmp).
|
||||
if (is_hidden_file(entry.path()))
|
||||
if (!show_hidden_files && is_hidden_file(entry.path()))
|
||||
continue;
|
||||
|
||||
if (fs::is_regular_file(entry.status())) {
|
||||
|
@ -568,6 +568,7 @@ FileManagerView::FileManagerView(
|
|||
&button_open_notepad,
|
||||
&button_rename_timestamp,
|
||||
&button_open_iq_trim,
|
||||
&button_show_hidden_files,
|
||||
});
|
||||
|
||||
menu_view.on_highlight = [this]() {
|
||||
|
@ -658,6 +659,12 @@ FileManagerView::FileManagerView(
|
|||
} else
|
||||
nav_.display_modal("IQ Trim", "Not a capture file.");
|
||||
};
|
||||
|
||||
button_show_hidden_files.on_select = [this]() {
|
||||
show_hidden_files = !show_hidden_files;
|
||||
button_show_hidden_files.set_color(show_hidden_files ? Color::green() : Color::dark_grey());
|
||||
reload_current();
|
||||
};
|
||||
}
|
||||
|
||||
} // namespace ui
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue