26 lines
630 B
Swift
26 lines
630 B
Swift
|
//
|
||
|
// 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"
|
||
|
}
|
||
|
|
||
|
extension UserActivityType {
|
||
|
var handle: (NSUserActivity) -> Void {
|
||
|
switch self {
|
||
|
case .newPost:
|
||
|
return UserActivityManager.handleNewPost
|
||
|
case .checkNotifications:
|
||
|
return UserActivityManager.handleCheckNotifications
|
||
|
}
|
||
|
}
|
||
|
}
|