DeviceListener:onToggleFrontlight: add notification of "unchanged" (#10727)

This commit is contained in:
hasezoey
2023-07-23 13:33:24 +02:00
committed by GitHub
parent b1109a729e
commit 618f065de4

View File

@@ -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()