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

reviewable/pr10732/r1
hasezoey 10 months ago committed by GitHub
parent b1109a729e
commit 618f065de4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save