Substitute Escher app() by Container::activeApp()

This commit is contained in:
Ruben Dashyan
2019-07-18 16:10:26 +02:00
committed by EmilieNumworks
parent 1a2a651f36
commit 44809f4b3f
101 changed files with 181 additions and 197 deletions

View File

@@ -44,14 +44,14 @@ void SumGraphController::viewWillAppear() {
void SumGraphController::didEnterResponderChain(Responder * previousFirstResponder) {
app()->setFirstResponder(m_legendView.textField());
Container::activeApp()->setFirstResponder(m_legendView.textField());
}
bool SumGraphController::handleEvent(Ion::Events::Event event) {
if (event == Ion::Events::Back && m_step != Step::FirstParameter) {
m_step = (Step)((int)m_step-1);
if (m_step == Step::SecondParameter) {
app()->setFirstResponder(m_legendView.textField());
Container::activeApp()->setFirstResponder(m_legendView.textField());
m_graphView->setAreaHighlightColor(false);
m_graphView->setCursorView(&m_cursorView);
}
@@ -95,7 +95,7 @@ bool SumGraphController::textFieldDidFinishEditing(TextField * textField, const
return false;
}
if ((m_step == Step::SecondParameter && floatBody < m_startSum) || !moveCursorHorizontallyToPosition(floatBody)) {
app()->displayWarning(I18n::Message::ForbiddenValue);
Container::activeApp()->displayWarning(I18n::Message::ForbiddenValue);
return false;
}
return handleEnter();
@@ -125,7 +125,7 @@ bool SumGraphController::handleEnter() {
} else {
m_graphView->setAreaHighlightColor(true);
m_graphView->setCursorView(nullptr);
app()->setFirstResponder(this);
Container::activeApp()->setFirstResponder(this);
}
m_step = (Step)((int)m_step+1);
reloadBannerView();