Disable irrelevant plugins on devices with no frontlight (#12766)

Closes #12764
This commit is contained in:
mergen3107 authored and GitHub committed 2024-11-21 19:31:43 +01:00
1 parent 0e2dadf6e0
commit 61ffe2abed
2 files changed
+6 -1

No files matched your search

+5
View File
@@ -5,6 +5,11 @@ Plugin for automatic dimming of the frontlight after an idle period.
--]]--
local Device = require("device")
if not Device:hasFrontlight() then
return { disabled = true, }
end
local FFIUtil = require("ffi/util")
local SpinWidget = require("ui/widget/spinwidget")
local UIManager = require("ui/uimanager")
+1 -1
View File
@@ -2,5 +2,5 @@ local _ = require("gettext")
return {
name = "autowarmth",
fullname = require("device"):hasNaturalLight() and _("Auto warmth and night mode") or _("Auto night mode"),
description = _([[This plugin allows to set the frontlight warmth automagically.]]),
description = require("device"):hasNaturalLight() and _([[This plugin allows to set the frontlight warmth and night mode automagically.]]) or _([[This plugin allows to enable night mode automagically.]]),
}