// // UserActivityType.swift // Tusker // // Created by Shadowfacts on 10/19/18. // Copyright © 2018 Shadowfacts. All rights reserved. // import Foundation enum UserActivityType: String { case newPost = "net.shadowfacts.Tusker.activity.new-post" case checkNotifications = "net.shadowfacts.Tusker.activity.check-notifications" case showTimeline = "net.shadowfacts.Tusker.activity.show-timeline" } extension UserActivityType { var handle: (NSUserActivity) -> Void { switch self { case .newPost: return UserActivityManager.handleNewPost case .checkNotifications: return UserActivityManager.handleCheckNotifications case .showTimeline: return UserActivityManager.handleShowTimeline } } }