mirror of
https://github.com/mastodon/mastodon-ios.git
synced 2024-12-25 00:13:28 +01:00
30 lines
830 B
Swift
30 lines
830 B
Swift
//
|
|
// IntentHandler.swift
|
|
// MastodonIntent
|
|
//
|
|
// Created by Cirno MainasuK on 2021-7-26.
|
|
//
|
|
|
|
import Intents
|
|
|
|
class IntentHandler: INExtension {
|
|
|
|
override func handler(for intent: INIntent) -> Any {
|
|
// This is the default implementation. If you want different objects to handle different intents,
|
|
// you can override this and return the handler you want for that particular intent.
|
|
switch intent {
|
|
case is SendPostIntent:
|
|
return SendPostIntentHandler()
|
|
case is FollowersCountIntent:
|
|
return FollowersCountIntentHandler()
|
|
case is MultiFollowersCountIntent:
|
|
return MultiFollowersCountIntentHandler()
|
|
case is HashtagIntent:
|
|
return HashtagIntentHandler()
|
|
default:
|
|
return self
|
|
}
|
|
}
|
|
|
|
}
|