Skip to content

Commit

Permalink
Code linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Thumbler1983 committed Jul 16, 2024
1 parent 2be056c commit 9528488
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions packages/xandr_ios/ios/Classes/XandrPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ public class XandrPlugin: UIViewController, FlutterPlugin,

private func parentController() -> UIViewController {
var topController: UIViewController = UIApplication.shared.keyWindow!.rootViewController!
while (topController.presentedViewController != nil) {
topController = topController.presentedViewController!
}
return topController
while topController.presentedViewController != nil {
topController = topController.presentedViewController!
}
return topController
}

public static func register(with registrar: FlutterPluginRegistrar) {
// init the plugin and call onRegister
Expand Down Expand Up @@ -140,7 +140,10 @@ public class XandrPlugin: UIViewController, FlutterPlugin,
if autoDismissDelay == nil {
self.interstitialAd?.display(from: self.parentController())
} else {
self.interstitialAd?.display(from: self.parentController(), autoDismissDelay: Double(autoDismissDelay!))
self.interstitialAd?.display(
from: self.parentController(),
autoDismissDelay: Double(autoDismissDelay!)
)
}
}

Expand Down

0 comments on commit 9528488

Please sign in to comment.