From 2785f0d1133e023d038a76a7cec7a1aee3f3575b Mon Sep 17 00:00:00 2001 From: zwim <36999612+zwim@users.noreply.github.com> Date: Fri, 20 Nov 2020 10:33:47 +0100 Subject: [PATCH] Remove leftover and correct info message on empty fallback (#6897) Cf. https://github.com/koreader/koreader/pull/6813#discussion_r527459959 --- plugins/coverimage.koplugin/main.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/coverimage.koplugin/main.lua b/plugins/coverimage.koplugin/main.lua index 21db285a7..240c09676 100644 --- a/plugins/coverimage.koplugin/main.lua +++ b/plugins/coverimage.koplugin/main.lua @@ -313,7 +313,6 @@ function CoverImage:addToMainMenu(menu_items) checked_func = function() return lfs.attributes(self.cover_image_fallback_path, "mode") == "file" end, - help_text = _("File to use when no cover is wanted (found ???) or book is excluded.\nLeave this blank to turn off the fallback image."), keep_menu_open = true, callback = function(menu) local InputDialog = require("ui/widget/inputdialog") @@ -337,7 +336,8 @@ function CoverImage:addToMainMenu(menu_items) callback = function() self.cover_image_fallback_path = sample_input:getInputText() G_reader_settings:saveSetting("cover_image_fallback_path", self.cover_image_fallback_path) - if lfs.attributes(self.cover_image_fallback_path, "mode") ~= "file" then + if lfs.attributes(self.cover_image_fallback_path, "mode") ~= "file" + and self.cover_image_fallback_path ~= "" then UIManager:show(InfoMessage:new{ text = T(_("\"%1\" \nis not a valid image file!\nA valid fallback image is required in Cover-Image"), self.cover_image_fallback_path),