Allow following links to local files (#4064)

Also use the new ReaderUI:switchDocument(new_file) when
already in ReaderUI in the other cases we switch document.
This commit is contained in:
poire-z
2018-07-11 18:05:30 +02:00
committed by GitHub
parent 665cb37308
commit 8c9fe9b589
4 changed files with 55 additions and 23 deletions

View File

@@ -132,9 +132,8 @@ function ReaderStatus:openNextFile(next_file)
end
next_file = FileManager.instance.file_chooser:getNextFile(next_file)
FileManager.instance:onClose()
local ReaderUI = require("apps/reader/readerui")
if next_file then
ReaderUI:showReader(next_file)
self.ui:switchDocument(next_file)
else
UIManager:show(InfoMessage:new{
text = _("This is the last file in the current folder. No next file to open."),