Files
Upsilon/apps/on_boarding/update_controller.cpp
Émilie Feral 029b04fb2e [apps/shared] Move message controller from on boarding to shared to be
used by code app

Change-Id: Ie73c765154573fcd3fd1a8a3cde71eeb3f13afe1
2017-08-17 16:21:21 +02:00

22 lines
736 B
C++

#include "update_controller.h"
#include "../apps_container.h"
#include <assert.h>
UpdateController::UpdateController() :
MessageController(I18n::Message::UpdateAvailable, I18n::Message::UpdateMessage1, I18n::Message::UpdateMessage2, I18n::Message::UpdateMessage3, I18n::Message::UpdateMessage4)
{
}
bool UpdateController::handleEvent(Ion::Events::Event event) {
if (MessageController::handleEvent(event)) {
AppsContainer * appsContainer = (AppsContainer *)app()->container();
if (appsContainer->activeApp()->snapshot() == appsContainer->onBoardingAppSnapshot()) {
appsContainer->refreshPreferences();
appsContainer->switchTo(appsContainer->appSnapshotAtIndex(0));
}
return true;
}
return false;
}