mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Screensaver: Fix a fallback snafu (#7397)
* Screensaver: Don't assume a missing show_message setting means that type setting is, too.
This commit is contained in:
@@ -371,8 +371,8 @@ function Screensaver:setup(event, fallback_message)
|
||||
if G_reader_settings:has("screensaver_show_message") then
|
||||
self.show_message = G_reader_settings:isTrue("screensaver_show_message")
|
||||
else
|
||||
self.screensaver_type = "disable"
|
||||
self.show_message = true
|
||||
-- We only enable show_message as a *type* fallback!
|
||||
self.show_message = false
|
||||
end
|
||||
if G_reader_settings:has("screensaver_type") then
|
||||
self.screensaver_type = G_reader_settings:readSetting("screensaver_type")
|
||||
|
||||
@@ -300,19 +300,19 @@ describe("OPDS module #nocov", function()
|
||||
end)
|
||||
it("should use the main URL for faceted links as long as faceted links aren't properly supported", function()
|
||||
local catalog = OPDSParser:parse(facet_sample)
|
||||
local item_table = OPDSBrowser:genItemTableFromCatalog(catalog, "http://flibusta.net/opds")
|
||||
local item_table = OPDSBrowser:genItemTableFromCatalog(catalog, "http://flibusta.is/opds")
|
||||
|
||||
assert.truthy(item_table)
|
||||
assert.are.same(item_table[2].url, "http://flibusta.net/opds/author/75357")
|
||||
assert.are.same(item_table[2].url, "http://flibusta.is/opds/author/75357")
|
||||
end)
|
||||
end)
|
||||
|
||||
it("should not fill item table incorrectly with thumbnail or image URL", function()
|
||||
local catalog = OPDSParser:parse(facet_sample)
|
||||
local item_table = OPDSBrowser:genItemTableFromCatalog(catalog, "http://flibusta.net/opds")
|
||||
local item_table = OPDSBrowser:genItemTableFromCatalog(catalog, "http://flibusta.is/opds")
|
||||
|
||||
assert.truthy(item_table)
|
||||
assert.are_not.same(item_table[2].image, "http://flibusta.net/opds/author/75357")
|
||||
assert.are_not.same(item_table[2].image, "http://flibusta.is/opds/author/75357")
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user