mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
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:
@@ -395,14 +395,8 @@ function ReaderFont:buildFontsTestDocument()
|
||||
UIManager:show(ConfirmBox:new{
|
||||
text = T(_("Document created as:\n%1\n\nWould you like to read it now?"), fonts_test_path),
|
||||
ok_callback = function()
|
||||
-- close current ReaderUI in 1 sec, and create a new one
|
||||
UIManager:scheduleIn(1.0, function()
|
||||
local ReaderUI = require("apps/reader/readerui")
|
||||
local reader = ReaderUI:_getRunningInstance()
|
||||
if reader then
|
||||
reader:onClose()
|
||||
end
|
||||
ReaderUI:showReader(fonts_test_path)
|
||||
self.ui:switchDocument(fonts_test_path)
|
||||
end)
|
||||
end,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user