Skip to content

Commit

Permalink
[notifications] Only hide notifications when the device is locked. Fi…
Browse files Browse the repository at this point in the history
…xes JB#37970
  • Loading branch information
adenexter committed Mar 14, 2017
1 parent 945bdb1 commit a4e4fc7
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 a4e4fc7

Please sign in to comment.