fix(color): touch events may not work correctly in the SD file browser (#5658)

This commit is contained in:
philmoz
2024-11-11 09:25:03 +10:00
committed by GitHub
parent d1c7bff8ef
commit 100906a576
2 changed files with 3 additions and 0 deletions
@@ -269,6 +269,7 @@ void FileBrowser::onSelected(const char* name, bool is_dir)
{
if (is_dir) {
if (fileSelected) fileSelected(nullptr, nullptr, nullptr, is_dir);
selected = nullptr;
return;
}
@@ -285,6 +286,7 @@ void FileBrowser::onPress(const char* name, bool is_dir)
if (is_dir) {
f_chdir(fullpath);
if (fileSelected) fileSelected(nullptr, nullptr, nullptr, is_dir);
selected = nullptr;
refresh();
return;
}
@@ -46,6 +46,7 @@ class FileBrowser : public TableField
void onSelected(uint16_t row, uint16_t col) override;
void onPress(uint16_t row, uint16_t col) override;
bool onPressLong(uint16_t row, uint16_t col) override;
bool onLongPress() override { return false; }
protected:
void onSelected(const char* name, bool is_dir);