[frontlight, kobo, cervantes] Remove auto_warmth (#8154)

The feature is now provided by the "Auto warmth
and night mode" plugin (#8129).
This commit is contained in:
zwim
2021-09-25 23:24:34 +02:00
committed by GitHub
parent 4a2f519600
commit 0c7d174cd7
6 changed files with 20 additions and 292 deletions

View File

@@ -7,7 +7,7 @@ local lfs = require("libs/libkoreader-lfs")
local logger = require("logger")
-- Date at which the last migration snippet was added
local CURRENT_MIGRATION_DATE = 20210831
local CURRENT_MIGRATION_DATE = 20210925
-- Retrieve the date of the previous migration, if any
local last_migration_date = G_reader_settings:readSetting("last_migration_date", 0)
@@ -312,5 +312,12 @@ if last_migration_date < 20210831 then
G_reader_settings:saveSetting("keyboard_layouts", keyboard_layouts_new)
end
-- 20210902, Remove unneeded auto_warmth settings after #8154
if last_migration_date < 20210925 then
logger.info("Performing one-time migration for 20210925")
G_reader_settings:delSetting("frontlight_auto_warmth")
G_reader_settings:delSetting("frontlight_max_warmth_hour")
end
-- We're done, store the current migration date
G_reader_settings:saveSetting("last_migration_date", CURRENT_MIGRATION_DATE)