More robust Gyro toggle (#5104)

* Make toggling Gyro events more robust

Actually ask to turn it on/off depending on the setting, instead of a
blind toggle

A quick succession of suspend/resume events could otherwise leave it
in an unexpected state (i.e., off when it should have been on).
This commit is contained in:
NiLuJe
2019-07-01 17:12:24 +02:00
committed by GitHub
parent 64cc7e0827
commit 38e7975728
6 changed files with 28 additions and 13 deletions

View File

@@ -8,6 +8,6 @@ return {
end,
callback = function()
G_reader_settings:flipNilOrFalse("input_ignore_gsensor")
Device:toggleGSensor()
Device:toggleGSensor(not G_reader_settings:isTrue("input_ignore_gsensor"))
end,
}