Skip to content

Commit e7c33e7

Browse files
committed
chor: formatting
1 parent e1e056a commit e7c33e7

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

flutter_readium/ios/flutter_readium/Sources/flutter_readium/ReadiumReaderView.swift

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,20 +102,19 @@ class ReadiumReaderView: NSObject, FlutterPlatformView, EPUBNavigatorDelegate {
102102
channel.setMethodCallHandler(onMethodCall)
103103
readiumViewController.delegate = self
104104

105-
let child: UIView = readiumViewController.view // Must specify type `UIView`, or we end up with an `UIView?` instead…
105+
let child: UIView = readiumViewController.view
106106
let view = _view
107-
108107
view.addSubview(readiumViewController.view)
109108

110109
child.translatesAutoresizingMaskIntoConstraints = false
111110

112111
NSLayoutConstraint.activate(
113-
[
114-
child.leadingAnchor.constraint(equalTo: view.leadingAnchor),
115-
child.trailingAnchor.constraint(equalTo: view.trailingAnchor),
116-
child.topAnchor.constraint(equalTo: view.topAnchor),
117-
child.bottomAnchor.constraint(equalTo: view.bottomAnchor)
118-
]
112+
[
113+
child.leadingAnchor.constraint(equalTo: view.leadingAnchor),
114+
child.trailingAnchor.constraint(equalTo: view.trailingAnchor),
115+
child.topAnchor.constraint(equalTo: view.topAnchor),
116+
child.bottomAnchor.constraint(equalTo: view.bottomAnchor)
117+
]
119118
)
120119

121120
setCurrentReadiumReaderView(self)
@@ -240,7 +239,7 @@ class ReadiumReaderView: NSObject, FlutterPlatformView, EPUBNavigatorDelegate {
240239

241240
if shouldGo {
242241
print(TAG, "goToLocator: Go to \(locator.href)")
243-
let goToSuccees = await readiumViewController.go(to: locator, options: NavigatorGoOptions(animated: false))
242+
let goToSuccees = await readiumViewController.go(to: locator, options: NavigatorGoOptions(animated: animated))
244243
if (goToSuccees && shouldScroll) {
245244
await self.scrollTo(locations: locations, toStart: false)
246245
self.emitOnPageChanged()

0 commit comments

Comments
 (0)