MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / onNavigateUpPressed

Method onNavigateUpPressed

Tactility/Source/app/fileselection/View.cpp:141–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139}
140
141void 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
157void View::update() {
158 auto scoped_lockable = lvgl::getSyncLock()->asScopedLock();

Callers 1

Calls 4

getPathParentFunction · 0.85
infoMethod · 0.80
getCurrentPathMethod · 0.45
setEntriesForPathMethod · 0.45

Tested by

no test coverage detected