Make user activity helpers consistent

This commit is contained in:
Shadowfacts 2022-03-13 21:12:33 -04:00
parent c1291b0d96
commit b7a4f369f6
2 changed files with 4 additions and 4 deletions

View File

@ -125,7 +125,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
case NSUserActivity.readAllType:
split.showItemList(.all)
case NSUserActivity.readFeedType:
guard let feedID = activity.feedID() else {
guard let feedID = activity.feedID else {
break
}
let req = Feed.fetchRequest()
@ -134,7 +134,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
split.showItemList(.feed(feed))
}
case NSUserActivity.readGroupType:
guard let groupID = activity.groupID() else {
guard let groupID = activity.groupID else {
break
}
let req = Group.fetchRequest()

View File

@ -32,7 +32,7 @@ extension NSUserActivity {
}
}
func feedID() -> String? {
var feedID: String? {
if activityType == NSUserActivity.readFeedType {
return userInfo?["feedID"] as? String
} else {
@ -40,7 +40,7 @@ extension NSUserActivity {
}
}
func groupID() -> String? {
var groupID: String? {
if activityType == NSUserActivity.readGroupType {
return userInfo?["groupID"] as? String
} else {