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:
|
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()
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue