Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'jb37970' into 'master'
[notifications] Only hide notifications when the device is locked. Fixes JB#37970

See merge request !14
  • Loading branch information
adenexter committed Mar 14, 2017
2 parents 945bdb1 + a4e4fc7 commit 6388605
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/nemo-devicelock/devicelock.cpp
Expand Up @@ -115,7 +115,14 @@ int DeviceLock::automaticLocking() const

bool DeviceLock::showNotifications() const
{
return m_state <= Locked && m_settings->showNotifications > 0;
switch (m_state) {
case Unlocked:
return true;
case Locked:
return m_settings->showNotifications > 0;
default:
return false;
}
}

/*!
Expand Down

0 comments on commit 6388605

Please sign in to comment.