[apps/calculation] Factor HistoryController::reload

This commit is contained in:
Ruben Dashyan
2019-10-01 17:44:12 +02:00
committed by Léa Saviot
parent e550712ccc
commit 7a49e23e3b
3 changed files with 7 additions and 6 deletions

View File

@@ -20,6 +20,13 @@ HistoryController::HistoryController(Responder * parentResponder, CalculationSto
void HistoryController::reload() {
m_selectableTableView.reloadData();
/* TODO
* Replace the following by selectCellAtLocation in order to avoid laying out
* the table view twice.
*/
if (numberOfRows() > 0) {
m_selectableTableView.scrollToCell(0, numberOfRows()-1);
}
}
void HistoryController::didBecomeFirstResponder() {