Wallabag remove from history setting fixes (#6059)

This commit is contained in:
mwoz123
2020-04-15 15:25:29 +02:00
committed by GitHub
parent 0b52fe9771
commit 8b4f1ca42e
2 changed files with 2 additions and 3 deletions

View File

@@ -558,7 +558,7 @@ function KOSync:getProgress(manual)
return
end
body.percentage = roundPercent(body.percentage)
body.percentage = Math.roundPercent(body.percentage)
local progress = self:getLastProgress()
local percentage = self:getLastPercent()
DEBUG("current progress", percentage)

View File

@@ -1042,8 +1042,7 @@ function Wallabag:getLastPercent()
end
end
function Wallabag:onCloseDocument()
function Wallabag:onCloseDocument()
if self.remove_finished_from_history then
local document_full_path = self.ui.document.file
if document_full_path and self.directory and self:getLastPercent() == 1 and self.directory == string.sub(document_full_path, 1, string.len(self.directory)) then