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

View File

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