| 139 | } |
| 140 | |
| 141 | void View::onNavigateUpPressed() { |
| 142 | if (state->getCurrentPath() != "/") { |
| 143 | LOGGER.info("Navigating upwards"); |
| 144 | std::string new_absolute_path; |
| 145 | if (string::getPathParent(state->getCurrentPath(), new_absolute_path)) { |
| 146 | state->setEntriesForPath(new_absolute_path); |
| 147 | } |
| 148 | if (new_absolute_path.length() > 1) { |
| 149 | lv_textarea_set_text(path_textarea, (new_absolute_path + "/").c_str()); |
| 150 | } else { |
| 151 | lv_textarea_set_text(path_textarea, new_absolute_path.c_str()); |
| 152 | } |
| 153 | update(); |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | void View::update() { |
| 158 | auto scoped_lockable = lvgl::getSyncLock()->asScopedLock(); |
no test coverage detected