Merge pull request #1930 from michalsrutek/feature/fix-couple-of-warnings

⚠️ Fix a couple of iOS warnings
This commit is contained in:
Lorenzo Pichilli 2023-12-23 13:56:16 +01:00 committed by GitHub
commit e1330c1304
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 5 deletions

View File

@ -145,7 +145,7 @@ public class InAppBrowserWebViewController: UIViewController, InAppBrowserDelega
}
}
if let wId = windowId {
if windowId != nil {
channelDelegate?.onBrowserCreated()
webView?.runWindowBeforeCreatedCallbacks()
} else {

View File

@ -138,7 +138,7 @@ public class FlutterWebViewController: NSObject, FlutterPlatformView, Disposable
}
load(initialUrlRequest: initialUrlRequest, initialFile: initialFile, initialData: initialData)
}
else if let wId = windowId {
else if windowId != nil {
webView.runWindowBeforeCreatedCallbacks()
}
}

View File

@ -39,7 +39,7 @@ public class WebMessageChannelChannelDelegate : ChannelDelegate {
if let webView = webMessageChannel?.webView, let ports = webMessageChannel?.ports, ports.count > 0 {
let index = arguments!["index"] as! Int
let port = ports[index]
var message = WebMessage.fromMap(map: arguments!["message"] as! [String: Any?])
let message = WebMessage.fromMap(map: arguments!["message"] as! [String: Any?])
var ports: [WebMessagePort] = []
if let notConnectedPorts = message.ports {

View File

@ -509,7 +509,7 @@ public class WebViewChannelDelegate : ChannelDelegate {
break
case .postWebMessage:
if let webView = webView {
var message = WebMessage.fromMap(map: arguments!["message"] as! [String: Any?])
let message = WebMessage.fromMap(map: arguments!["message"] as! [String: Any?])
let targetOrigin = arguments!["targetOrigin"] as! String
var ports: [WebMessagePort] = []

View File

@ -148,7 +148,7 @@ public class PrintJobSettings: ISettings<PrintJobController> {
}
override func getRealSettings(obj: PrintJobController?) -> [String: Any?] {
var realOptions: [String: Any?] = toMap()
let realOptions: [String: Any?] = toMap()
return realOptions
}
}