@ -144,8 +144,11 @@ function ReaderStatus:onEndOfBook()
}
UIManager : show ( info )
UIManager : forceRePaint ( )
self : openNextFile ( self.document . file )
UIManager : close ( info )
-- Delay until the next tick, as this will destroy the Document instance, but we may not be the final Event caught by said Document...
UIManager : nextTick ( function ( )
self : openNextFile ( self.document . file )
end )
else
UIManager : show ( InfoMessage : new {
text = _ ( " Could not open next file. Sort by last read date does not support this feature. " ) ,
@ -154,7 +157,10 @@ function ReaderStatus:onEndOfBook()
elseif settings == " goto_beginning " then
self.ui : handleEvent ( Event : new ( " GoToBeginning " ) )
elseif settings == " file_browser " then
self : openFileBrowser ( )
-- Ditto
UIManager : nextTick ( function ( )
self : openFileBrowser ( )
end )
elseif settings == " mark_read " then
self : onMarkBook ( true )
UIManager : show ( InfoMessage : new {
@ -162,10 +168,16 @@ function ReaderStatus:onEndOfBook()
timeout = 3
} )
elseif settings == " book_status_file_browser " then
local before_show_callback = function ( ) self : openFileBrowser ( ) end
self : onShowBookStatus ( before_show_callback )
-- Ditto
UIManager : nextTick ( function ( )
local before_show_callback = function ( ) self : openFileBrowser ( ) end
self : onShowBookStatus ( before_show_callback )
end )
elseif settings == " delete_file " then
self : deleteFile ( self.document . file , true )
-- Ditto
UIManager : nextTick ( function ( )
self : deleteFile ( self.document . file , true )
end )
end
end
@ -175,7 +187,6 @@ function ReaderStatus:openFileBrowser()
if not FileManager.instance then
self.ui : showFileManager ( )
end
self.document = nil
end
function ReaderStatus : openNextFile ( next_file )