EGD-2180 auto handling of back button

This commit is contained in:
Alek committed 2019-10-22 21:06:55 +02:00
1 parent e61140516a
commit f9b6f8fb40
20 files changed
+140 -202

No files matched your search

@@ -86,8 +86,7 @@ void NotesMainWindow::onBeforeShow( ShowMode mode, SwitchData* data ) {
bool NotesMainWindow::onInput( const InputEvent& inputEvent ) {
//check if any of the lower inheritance onInput methods catch the event
bool ret = AppWindow::onInput( inputEvent );
if( ret ) {
if( AppWindow::onInput( inputEvent ) ) {
//refresh window only when key is other than enter
if( inputEvent.keyCode != KeyCode::KEY_ENTER )
application->render( RefreshModes::GUI_REFRESH_FAST );
@@ -102,10 +101,6 @@ bool NotesMainWindow::onInput( const InputEvent& inputEvent ) {
if( inputEvent.keyCode == KeyCode::KEY_ENTER ) {
LOG_INFO("Enter pressed");
}
else if( inputEvent.keyCode == KeyCode::KEY_RF ) {
sapm::ApplicationManager::messageSwitchPreviousApplication(application);
return true;
}
else if( inputEvent.keyCode == KeyCode::KEY_LEFT ) {
application->switchWindow( "EditWindow" );
return true;