| 241 | } |
| 242 | |
| 243 | bool View::resolveDirentFromListIndex(int32_t list_index, dirent& out_entry) { |
| 244 | const bool is_root = (state->getCurrentPath() == "/"); |
| 245 | const bool has_back = (!is_root && current_start_index > 0); |
| 246 | |
| 247 | if (has_back && list_index == 0) { |
| 248 | return false; // Back button |
| 249 | } |
| 250 | |
| 251 | const size_t adjusted_index = |
| 252 | current_start_index + static_cast<size_t>(list_index) - (has_back ? 1 : 0); |
| 253 | |
| 254 | return state->getDirent(static_cast<uint32_t>(adjusted_index), out_entry); |
| 255 | } |
| 256 | |
| 257 | void View::onDirEntryPressed(uint32_t index) { |
| 258 | dirent dir_entry; |
nothing calls this directly
no test coverage detected