mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/code] Clean ConsoleController::reloadData (always returns true)
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user