diff --git a/apps/code/console_controller.cpp b/apps/code/console_controller.cpp index 9578137af..477dda7c3 100644 --- a/apps/code/console_controller.cpp +++ b/apps/code/console_controller.cpp @@ -151,9 +151,8 @@ const char * ConsoleController::inputText(const char * prompt) { m_editCell.clearAndReduceSize(); // Reload the history - if (reloadData(true)) { - appsContainer->redrawWindow(); - } + reloadData(true); + appsContainer->redrawWindow(); // Launch a new input loop appsContainer->runWhile([](void * a){ @@ -408,12 +407,13 @@ bool ConsoleController::isDisplayingViewController() { } void ConsoleController::refreshPrintOutput() { - if (!isDisplayingViewController() && reloadData(false)) { + if (!isDisplayingViewController()) { + reloadData(false); AppsContainer::sharedAppsContainer()->redrawWindow(); } } -bool ConsoleController::reloadData(bool isEditing) { +void ConsoleController::reloadData(bool isEditing) { m_selectableTableView.reloadData(); m_selectableTableView.selectCellAtLocation(0, m_consoleStore.numberOfLines()); if (isEditing) { @@ -422,7 +422,6 @@ bool ConsoleController::reloadData(bool isEditing) { } else { m_editCell.setEditing(false); } - return true; } /* printText is called by the Python machine. diff --git a/apps/code/console_controller.h b/apps/code/console_controller.h index 09192ce39..f198255a6 100644 --- a/apps/code/console_controller.h +++ b/apps/code/console_controller.h @@ -83,7 +83,7 @@ private: // k_numberOfLineCells = (240 - 18)/14 ~ 15.9. The 0.1 cell can be above and below the 15 other cells so we add +2 cells. static constexpr int k_outputAccumulationBufferSize = 100; bool isDisplayingViewController(); - bool reloadData(bool isEditing); + void reloadData(bool isEditing); void flushOutputAccumulationBufferToStore(); void appendTextToOutputAccumulationBuffer(const char * text, size_t length); void emptyOutputAccumulationBuffer();