mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-22 23:58:36 +01:00
Add better error messages for add feed shortcut
This commit is contained in:
parent
e52fb6ea32
commit
ba2d05ec27
@ -57,11 +57,18 @@ public class AddFeedIntentHandler: NSObject, AddFeedIntentHandling {
|
|||||||
switch result {
|
switch result {
|
||||||
case .success:
|
case .success:
|
||||||
completion(AddFeedIntentResponse(code: .success, userActivity: nil))
|
completion(AddFeedIntentResponse(code: .success, userActivity: nil))
|
||||||
case .failure:
|
case .failure(let error):
|
||||||
|
switch error {
|
||||||
|
case AccountError.createErrorNotFound:
|
||||||
|
completion(AddFeedIntentResponse(code: .feedNotFound, userActivity: nil))
|
||||||
|
case AccountError.createErrorAlreadySubscribed:
|
||||||
|
completion(AddFeedIntentResponse(code: .alreadySubscribed, userActivity: nil))
|
||||||
|
default:
|
||||||
completion(AddFeedIntentResponse(code: .failure, userActivity: nil))
|
completion(AddFeedIntentResponse(code: .failure, userActivity: nil))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -183,6 +183,30 @@
|
|||||||
<key>INIntentResponseCodeName</key>
|
<key>INIntentResponseCodeName</key>
|
||||||
<string>failure</string>
|
<string>failure</string>
|
||||||
</dict>
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>INIntentResponseCodeConciseFormatString</key>
|
||||||
|
<string>You are already subscribed to this feed in this account.</string>
|
||||||
|
<key>INIntentResponseCodeConciseFormatStringID</key>
|
||||||
|
<string>srME8b</string>
|
||||||
|
<key>INIntentResponseCodeFormatString</key>
|
||||||
|
<string>You are already subscribed to this feed in this account.</string>
|
||||||
|
<key>INIntentResponseCodeFormatStringID</key>
|
||||||
|
<string>UGGPkp</string>
|
||||||
|
<key>INIntentResponseCodeName</key>
|
||||||
|
<string>alreadySubscribed</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>INIntentResponseCodeConciseFormatString</key>
|
||||||
|
<string>No feed was found at the specified URL.</string>
|
||||||
|
<key>INIntentResponseCodeConciseFormatStringID</key>
|
||||||
|
<string>8Dh9Yy</string>
|
||||||
|
<key>INIntentResponseCodeFormatString</key>
|
||||||
|
<string>No feed was found at the specified URL.</string>
|
||||||
|
<key>INIntentResponseCodeFormatStringID</key>
|
||||||
|
<string>drQfaI</string>
|
||||||
|
<key>INIntentResponseCodeName</key>
|
||||||
|
<string>feedNotFound</string>
|
||||||
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
<key>INIntentTitle</key>
|
<key>INIntentTitle</key>
|
||||||
|
Loading…
Reference in New Issue
Block a user