[apps] Substitute "app()->container()" by "AppsContainer::sharedAppsContainer()"

This commit is contained in:
Ruben Dashyan
2019-05-14 15:06:23 +02:00
committed by EmilieNumworks
parent 268ad3f3ba
commit eb3da7f395
18 changed files with 25 additions and 30 deletions

View File

@@ -47,8 +47,7 @@ bool ExamPopUpController::handleEvent(Ion::Events::Event event) {
ExamPopUpController::ContentView::ContentView(Responder * parentResponder) :
m_cancelButton(parentResponder, I18n::Message::Cancel, Invocation([](void * context, void * sender) {
ExamPopUpController * controller = (ExamPopUpController *)context;
Container * container = (Container *)controller->app()->container();
AppsContainer * container = AppsContainer::sharedAppsContainer();
container->activeApp()->dismissModalViewController();
return true;
}, parentResponder), KDFont::SmallFont),
@@ -56,7 +55,7 @@ ExamPopUpController::ContentView::ContentView(Responder * parentResponder) :
ExamPopUpController * controller = (ExamPopUpController *)context;
GlobalPreferences::ExamMode nextExamMode = controller->isActivatingExamMode() ? GlobalPreferences::ExamMode::Activate : GlobalPreferences::ExamMode::Deactivate;
GlobalPreferences::sharedGlobalPreferences()->setExamMode(nextExamMode);
AppsContainer * container = (AppsContainer *)controller->app()->container();
AppsContainer * container = AppsContainer::sharedAppsContainer();
if (controller->isActivatingExamMode()) {
container->reset();
Ion::LED::setColor(KDColorRed);