mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
IdleInhibitorService.qml
This commit is contained in:
@@ -156,12 +156,12 @@ Singleton {
|
|||||||
function manualToggle() {
|
function manualToggle() {
|
||||||
if (activeInhibitors.includes("manual")) {
|
if (activeInhibitors.includes("manual")) {
|
||||||
removeInhibitor("manual")
|
removeInhibitor("manual")
|
||||||
ToastService.showNotice(I18n.tr("tooltips.keep-awake"), I18n.tr("toast.keep-awake.disabled"), "keep-awake-on")
|
ToastService.showNotice(I18n.tr("tooltips.keep-awake"), I18n.tr("toast.keep-awake.disabled"), "keep-awake-off")
|
||||||
Logger.i("IdleInhibitor", "Manual inhibition disabled")
|
Logger.i("IdleInhibitor", "Manual inhibition disabled")
|
||||||
return false
|
return false
|
||||||
} else {
|
} else {
|
||||||
addInhibitor("manual", "Manually activated by user")
|
addInhibitor("manual", "Manually activated by user")
|
||||||
ToastService.showNotice(I18n.tr("tooltips.keep-awake"), I18n.tr("toast.keep-awake.enabled"), "keep-awake-off")
|
ToastService.showNotice(I18n.tr("tooltips.keep-awake"), I18n.tr("toast.keep-awake.enabled"), "keep-awake-on")
|
||||||
Logger.i("IdleInhibitor", "Manual inhibition enabled (will reset on next session)")
|
Logger.i("IdleInhibitor", "Manual inhibition enabled (will reset on next session)")
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user