mirror of
https://github.com/koreader/koreader
synced 2024-11-04 12:00:25 +00:00
FileChooser: fix legacy "Files and folders mixed" collate setting (#10514)
Closes #10509.
This commit is contained in:
parent
128f205324
commit
a8244ddd23
@ -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 = 20221027
|
||||
local CURRENT_MIGRATION_DATE = 20230531
|
||||
|
||||
-- Retrieve the date of the previous migration, if any
|
||||
local last_migration_date = G_reader_settings:readSetting("last_migration_date", 0)
|
||||
@ -505,5 +505,14 @@ if last_migration_date < 20221027 then
|
||||
end
|
||||
end
|
||||
|
||||
-- 20230531, Rename `strcoll_mixed` to `strcoll`+`collate_mixed`, https://github.com/koreader/koreader/pull/10198
|
||||
if last_migration_date < 20230531 then
|
||||
logger.info("Performing one-time migration for 20230531")
|
||||
if G_reader_settings:readSetting("collate") == "strcoll_mixed" then
|
||||
G_reader_settings:saveSetting("collate", "strcoll")
|
||||
G_reader_settings:makeTrue("collate_mixed")
|
||||
end
|
||||
end
|
||||
|
||||
-- We're done, store the current migration date
|
||||
G_reader_settings:saveSetting("last_migration_date", CURRENT_MIGRATION_DATE)
|
||||
|
Loading…
Reference in New Issue
Block a user