Make user activity helpers consistent
This commit is contained in:
parent
c1291b0d96
commit
b7a4f369f6
|
@ -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()
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue