File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -156,11 +156,16 @@ public extension IntentPanel {
156156 let server = Current . servers. server ( for: self ) ?? Current . servers. all. first
157157 // Extract the path from the identifier (format: "serverIdentifier-path")
158158 let path : String
159- if let identifier, let serverIdentifier, identifier. hasPrefix ( " \( serverIdentifier) - " ) {
160- // Remove the server identifier prefix and the separator to get the path
161- path = String ( identifier. dropFirst ( serverIdentifier. count + 1 ) )
159+ if let identifier, let serverIdentifier {
160+ let prefix = serverIdentifier + " - "
161+ if identifier. hasPrefix ( prefix) {
162+ // Remove the server identifier prefix and the separator to get the path
163+ path = String ( identifier. dropFirst ( prefix. count) )
164+ } else {
165+ // Fallback for old identifiers or if extraction fails
166+ path = identifier
167+ }
162168 } else {
163- // Fallback for old identifiers or if extraction fails
164169 path = identifier ?? " lovelace "
165170 }
166171 return AppConstants . openPageDeeplinkURL (
You can’t perform that action at this time.
0 commit comments