mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
only set two pages mode for crengine in kindle dxg
This commit is contained in:
@@ -227,6 +227,10 @@ function CreDocument:setPageMargins(left, top, right, bottom)
|
||||
self._document:setPageMargins(left, top, right, bottom)
|
||||
end
|
||||
|
||||
function CreDocument:setVisiblePageCount(new_count)
|
||||
self._document:setVisiblePageCount(new_count)
|
||||
end
|
||||
|
||||
DocumentRegistry:addProvider("txt", "application/txt", CreDocument)
|
||||
DocumentRegistry:addProvider("epub", "application/epub", CreDocument)
|
||||
DocumentRegistry:addProvider("html", "application/html", CreDocument)
|
||||
|
||||
@@ -98,7 +98,7 @@ function ReaderUI:init()
|
||||
ui = self
|
||||
}
|
||||
table.insert(self, reader_bm)
|
||||
-- text highlight
|
||||
-- text highlight
|
||||
local highlight = ReaderHighlight:new{
|
||||
dialog = self.dialog,
|
||||
view = self[1],
|
||||
@@ -106,7 +106,7 @@ function ReaderUI:init()
|
||||
document = self.document,
|
||||
}
|
||||
table.insert(self, highlight)
|
||||
-- dictionary
|
||||
-- dictionary
|
||||
local dict = ReaderDictionary:new{
|
||||
dialog = self.dialog,
|
||||
view = self[1],
|
||||
@@ -170,6 +170,9 @@ function ReaderUI:init()
|
||||
}
|
||||
table.insert(self, hinter)
|
||||
else
|
||||
if Device:getModel() ~= "KindleDXG" then
|
||||
self.document:setVisiblePageCount(1)
|
||||
end
|
||||
-- make sure we load document first before calling any callback
|
||||
table.insert(self.postInitCallback, function()
|
||||
self.document:loadDocument()
|
||||
|
||||
Reference in New Issue
Block a user