@@ -59,8 +59,9 @@ class IncomingURLHandler {
5959 return false
6060 }
6161
62- if let presenting = windowController. presentedViewController,
63- presenting is SFSafariViewController {
62+ if
63+ let presenting = windowController. presentedViewController,
64+ presenting is SFSafariViewController {
6465 // Dismiss my.* controller if it's on top - we don't get any other indication
6566 presenting. dismiss ( animated: true , completion: { [ windowController] in
6667 windowController? . openSelectingServer (
@@ -105,7 +106,7 @@ class IncomingURLHandler {
105106 autoStartRecording: autoStartRecording
106107 )
107108 case let . rejected( error) :
108- Current . Log. error ( " Failed to obtain webview to open Assist In App " )
109+ Current . Log. error ( " Failed to obtain webview to open Assist In App: \( error . localizedDescription ) " )
109110 }
110111 }
111112
@@ -137,8 +138,9 @@ class IncomingURLHandler {
137138 if let url = userActivity. webpageURL, url. host? . lowercased ( ) == " my.home-assistant.io " {
138139 return showMy ( for: url)
139140 } else if let interaction = userActivity. interaction {
140- if let intent = interaction. intent as? OpenPageIntent ,
141- let panel = intent. page, let path = panel. identifier {
141+ if
142+ let intent = interaction. intent as? OpenPageIntent ,
143+ let panel = intent. page, let path = panel. identifier {
142144 Current . Log. info ( " launching from shortcuts with panel \( panel) " )
143145
144146 let urlString = " / " + path
@@ -177,8 +179,9 @@ class IncomingURLHandler {
177179 } )
178180 } . asVoid ( )
179181 } else {
180- if let action = Current . realm ( ) . object ( ofType: Action . self, forPrimaryKey: shortcutItem. type) ,
181- let server = Current . servers. server ( for: action) {
182+ if
183+ let action = Current . realm ( ) . object ( ofType: Action . self, forPrimaryKey: shortcutItem. type) ,
184+ let server = Current . servers. server ( for: action) {
182185 Current . sceneManager. showFullScreenConfirm (
183186 icon: MaterialDesignIcons ( named: action. IconName) ,
184187 text: action. Text,
@@ -517,8 +520,9 @@ extension IncomingURLHandler {
517520 }
518521
519522 let source : HomeAssistantAPI . ActionSource = {
520- if let sourceString = serviceData [ " source " ] ,
521- let source = HomeAssistantAPI . ActionSource ( rawValue: sourceString) {
523+ if
524+ let sourceString = serviceData [ " source " ] ,
525+ let source = HomeAssistantAPI . ActionSource ( rawValue: sourceString) {
522526 return source
523527 } else {
524528 return . URLHandler
@@ -527,8 +531,9 @@ extension IncomingURLHandler {
527531
528532 let actionID = url. pathComponents [ 1 ]
529533
530- guard let action = Current . realm ( ) . object ( ofType: Action . self, forPrimaryKey: actionID) ,
531- let server = Current . servers. server ( for: action) else {
534+ guard
535+ let action = Current . realm ( ) . object ( ofType: Action . self, forPrimaryKey: actionID) ,
536+ let server = Current . servers. server ( for: action) else {
532537 Current . sceneManager. showFullScreenConfirm (
533538 icon: . alertCircleIcon,
534539 text: L10n . UrlHandler. Error. actionNotFound,
0 commit comments