Skip to content

Commit

Permalink
Fix #203 (#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
Eeems authored Jul 11, 2021
1 parent 66fee40 commit 98790e6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion applications/system-service/dbusservice.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,15 @@ class DBusService : public APIBase {
connect(buttonHandler, &ButtonHandler::activity, systemAPI, &SystemAPI::activity);
connect(powerAPI, &PowerAPI::chargerStateChanged, systemAPI, &SystemAPI::activity);
connect(systemAPI, &SystemAPI::leftAction, appsAPI, []{
if(!notificationAPI->locked() && !appsAPI->previousApplicationNoSecurityCheck()){
if(notificationAPI->locked()){
return;
}
auto currentApplication = appsAPI->getApplication(appsAPI->currentApplicationNoSecurityCheck());
if(currentApplication != nullptr && currentApplication->path() == appsAPI->lockscreenApplication().path()){
qDebug() << "Left Action cancelled. On lockscreen";
return;
}
if(!appsAPI->previousApplicationNoSecurityCheck()){
appsAPI->openDefaultApplication();
}
});
Expand Down

0 comments on commit 98790e6

Please sign in to comment.