[UX] plugins/kobolight: Handle automatic warmth

If warmth is handled automatically, do not try to change warmth but
display a message instead.
pull/3823/head
David Engster 6 years ago committed by Frans de Jonge
parent daa1f466ff
commit ba46376299

@ -199,10 +199,18 @@ function KoboLight:onSwipe(_, ges)
return true
end
function KoboLight:onSwipeWarmth(_, ges)
function KoboLight:onSwipeWarmth(ignored, ges)
local powerd = Device:getPowerDevice()
if powerd.fl_warmth == nil then return false end
if powerd.auto_warmth then
UIManager:show(Notification:new{
text = _("Warmth is handled automatically."),
timeout = 1.0,
})
return true
end
local step = math.ceil(#self.steps * ges.distance / self.gestureScale)
local delta_int = self.steps[step] or self.steps[#self.steps]
local warmth

Loading…
Cancel
Save