diff --git a/.luacheckrc b/.luacheckrc index e4ccc04b9..97e10b422 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -159,6 +159,7 @@ files["spec/unit/*"].globals = { -- 631 - Line is too long ignore = { "211/__*", + "231/__", "631", "dummy", } diff --git a/plugins/statistics.koplugin/main.lua b/plugins/statistics.koplugin/main.lua index f04882785..895b4edc6 100755 --- a/plugins/statistics.koplugin/main.lua +++ b/plugins/statistics.koplugin/main.lua @@ -241,7 +241,13 @@ Do you want to create an empty database? else -- first time convertion to sqlite database self.convert_to_db = true if not conn:exec("pragma table_info('book');") then - if #ReadHistory.hist > 0 then + local filename_first_history, quickstart_filename, __ + if #ReadHistory.hist == 1 then + filename_first_history = ReadHistory.hist[1]["text"] + local quickstart_path = require("ui/quickstart").quickstart_filename + __, quickstart_filename = util.splitFilePathName(quickstart_path) + end + if #ReadHistory.hist > 1 or (#ReadHistory.hist == 1 and filename_first_history ~= quickstart_filename) then local info = InfoMessage:new{ text =_([[ New version of statistics plugin detected.