[apps/code] Quick hacks to allow pushing a view controller

This commit is contained in:
Romain Goyet
2020-03-10 20:54:42 -04:00
committed by Émilie Feral
parent 131df18b00
commit 2b73c4c9aa

View File

@@ -351,12 +351,14 @@ bool ConsoleController::textFieldDidFinishEditing(TextField * textField, const c
}
telemetryReportEvent("Console", text);
runAndPrintForCommand(text);
Responder * firstResponder = Container::activeApp()->firstResponder(); // FIXME
if (!sandboxIsDisplayed()) {
m_selectableTableView.reloadData();
m_editCell.setEditing(true);
textField->setText("");
m_selectableTableView.selectCellAtLocation(0, m_consoleStore.numberOfLines());
}
Container::activeApp()->setFirstResponder(firstResponder); // FIXME
return true;
}
@@ -436,7 +438,8 @@ void ConsoleController::printText(const char * text, size_t length) {
assert(textCutIndex == length - 1);
appendTextToOutputAccumulationBuffer(text, length-1);
flushOutputAccumulationBufferToStore();
micropython_port_vm_hook_refresh_print();
// FIXME: This needs to be done *only* if the console is active!
//micropython_port_vm_hook_refresh_print();
}
#if __EMSCRIPTEN__
/* If we called micropython_port_interrupt_if_needed here, we would need to