fix(settings): screen brightness setting only applies to the reader page, closes #2717 (#2720)
Some checks are pending
Deploy to vercel on merge / build_and_deploy (push) Waiting to run

This commit is contained in:
Huang Xin 2025-12-15 13:04:29 +08:00 committed by GitHub
parent 0bd6a217ae
commit 7063d62b13
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 43 additions and 23 deletions

View file

@ -812,7 +812,13 @@ class NativeBridgePlugin: Plugin {
let brightness = args.brightness ?? 0.5
if brightness < 0.0 || brightness > 1.0 {
if brightness < 0.0 {
// Revert to system brightness - iOS doesn't have a direct "system brightness" setting
// We will restore the brightness that was set before the app modified it
return invoke.resolve(["success": true])
}
if brightness > 1.0 {
return invoke.reject("Brightness must be between 0.0 and 1.0")
}