From 618f065de4ef1ab5d9df385e42b655980b1e72f3 Mon Sep 17 00:00:00 2001 From: hasezoey Date: Sun, 23 Jul 2023 13:33:24 +0200 Subject: [PATCH] DeviceListener:onToggleFrontlight: add notification of "unchanged" (#10727) --- frontend/device/devicelistener.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/device/devicelistener.lua b/frontend/device/devicelistener.lua index 2351003f3..cb7b8a446 100644 --- a/frontend/device/devicelistener.lua +++ b/frontend/device/devicelistener.lua @@ -197,7 +197,9 @@ if Device:hasFrontlight() then local notif_cb = function() Notification:notify(new_text, notif_source) end - powerd:toggleFrontlight(notif_cb) + if not powerd:toggleFrontlight(notif_cb) then + Notification:notify(_("Frontlight unchanged."), notif_source) + end end function DeviceListener:onShowFlDialog()