feat: improve epub reader controls and annotations
This commit is contained in:
@@ -5,14 +5,16 @@ extension RDEPUBReaderController {
|
||||
|
||||
func applyReaderViewConfiguration() {
|
||||
let resolvedDirection = resolvedPageDirection()
|
||||
let allowsLandscapeDualPage = configuration.landscapeDualPageEnabled
|
||||
&& publication?.requiresSinglePagePresentation != true
|
||||
let presentationDidChange = readerView.currentDisplayType != configuration.displayType
|
||||
|| readerView.landscapeDualPageEnabled != configuration.landscapeDualPageEnabled
|
||||
|| readerView.landscapeDualPageEnabled != allowsLandscapeDualPage
|
||||
|| readerView.pageDirection != resolvedDirection
|
||||
let preservedLocation = presentationDidChange
|
||||
? (runtime.viewportMonitor.consumePendingPresentationRestoreLocation() ?? currentVisibleLocation() ?? persistenceLocation())
|
||||
: nil
|
||||
view.backgroundColor = configuration.theme.contentBackgroundColor
|
||||
readerView.landscapeDualPageEnabled = configuration.landscapeDualPageEnabled
|
||||
readerView.landscapeDualPageEnabled = allowsLandscapeDualPage
|
||||
readerView.pageDirection = resolvedDirection
|
||||
updateReaderChrome()
|
||||
if presentationDidChange {
|
||||
|
||||
Reference in New Issue
Block a user