35 lines
726 B
Swift
35 lines
726 B
Swift
|
//
|
||
|
// StatusActivity.swift
|
||
|
// Tusker
|
||
|
//
|
||
|
// Created by Shadowfacts on 12/14/19.
|
||
|
// Copyright © 2019 Shadowfacts. All rights reserved.
|
||
|
//
|
||
|
|
||
|
import UIKit
|
||
|
import Pachyderm
|
||
|
|
||
|
class StatusActivity: UIActivity {
|
||
|
|
||
|
override class var activityCategory: UIActivity.Category {
|
||
|
return .action
|
||
|
}
|
||
|
|
||
|
var status: Status?
|
||
|
|
||
|
override func canPerform(withActivityItems activityItems: [Any]) -> Bool {
|
||
|
for case is Status in activityItems {
|
||
|
return true
|
||
|
}
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
override func prepare(withActivityItems activityItems: [Any]) {
|
||
|
for case let status as Status in activityItems {
|
||
|
self.status = status
|
||
|
return
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|