chore(Widget): Rename MultiFollowersCountSmallIntent -> MultiFollowersCountIntent

This commit is contained in:
Marcus Kida 2023-01-31 14:55:59 +01:00
parent 15b6b9fb93
commit 8438bbc032
No known key found for this signature in database
GPG Key ID: 19FF64E08013CA40
6 changed files with 14 additions and 14 deletions

View File

@ -62,7 +62,7 @@
<key>NSUserActivityTypes</key>
<array>
<string>FollowersCountIntent</string>
<string>MultiFollowersCountSmallIntent</string>
<string>MultiFollowersCountIntent</string>
<string>SendPostIntent</string>
</array>
<key>UIApplicationSceneManifest</key>

View File

@ -6,8 +6,8 @@ import MastodonCore
import MastodonSDK
import MastodonLocalization
class MultiFollowersCountIntentHandler: INExtension, MultiFollowersCountSmallIntentHandling {
func provideAccountsOptionsCollection(for intent: MultiFollowersCountSmallIntent, searchTerm: String?) async throws -> INObjectCollection<NSString> {
class MultiFollowersCountIntentHandler: INExtension, MultiFollowersCountIntentHandling {
func provideAccountsOptionsCollection(for intent: MultiFollowersCountIntent, searchTerm: String?) async throws -> INObjectCollection<NSString> {
guard
let searchTerm = searchTerm,
let authenticationBox = WidgetExtension.appContext

View File

@ -31,7 +31,7 @@
<key>IntentsSupported</key>
<array>
<string>FollowersCountIntent</string>
<string>MultiFollowersCountSmallIntent</string>
<string>MultiFollowersCountIntent</string>
<string>SendPostIntent</string>
</array>
</dict>

View File

@ -17,7 +17,7 @@ class IntentHandler: INExtension {
return SendPostIntentHandler()
case is FollowersCountIntent:
return FollowersCountIntentHandler()
case is MultiFollowersCountSmallIntent:
case is MultiFollowersCountIntent:
return MultiFollowersCountIntentHandler()
default:
return self

View File

@ -10,14 +10,14 @@ struct MultiFollowersCountWidgetProvider: IntentTimelineProvider {
.placeholder
}
func getSnapshot(for configuration: MultiFollowersCountSmallIntent, in context: Context, completion: @escaping (MultiFollowersCountEntry) -> ()) {
func getSnapshot(for configuration: MultiFollowersCountIntent, in context: Context, completion: @escaping (MultiFollowersCountEntry) -> ()) {
guard !context.isPreview else {
return completion(.placeholder)
}
loadCurrentEntry(for: configuration, in: context, completion: completion)
}
func getTimeline(for configuration: MultiFollowersCountSmallIntent, in context: Context, completion: @escaping (Timeline<MultiFollowersCountEntry>) -> ()) {
func getTimeline(for configuration: MultiFollowersCountIntent, in context: Context, completion: @escaping (Timeline<MultiFollowersCountEntry>) -> ()) {
loadCurrentEntry(for: configuration, in: context) { entry in
completion(Timeline(entries: [entry], policy: .after(.now)))
}
@ -27,7 +27,7 @@ struct MultiFollowersCountWidgetProvider: IntentTimelineProvider {
struct MultiFollowersCountEntry: TimelineEntry {
let date: Date
let accounts: [FollowersEntryAccountable]?
let configuration: MultiFollowersCountSmallIntent
let configuration: MultiFollowersCountIntent
static var placeholder: Self {
MultiFollowersCountEntry(
@ -41,7 +41,7 @@ struct MultiFollowersCountEntry: TimelineEntry {
domain: "mastodon"
)
],
configuration: MultiFollowersCountSmallIntent()
configuration: MultiFollowersCountIntent()
)
}
@ -49,7 +49,7 @@ struct MultiFollowersCountEntry: TimelineEntry {
MultiFollowersCountEntry(
date: .now,
accounts: [],
configuration: MultiFollowersCountSmallIntent()
configuration: MultiFollowersCountIntent()
)
}
}
@ -60,7 +60,7 @@ struct MultiFollowersCountWidget: Widget {
}
var body: some WidgetConfiguration {
IntentConfiguration(kind: "Multiple followers", intent: MultiFollowersCountSmallIntent.self, provider: MultiFollowersCountWidgetProvider()) { entry in
IntentConfiguration(kind: "Multiple followers", intent: MultiFollowersCountIntent.self, provider: MultiFollowersCountWidgetProvider()) { entry in
MultiFollowersCountWidgetView(entry: entry)
}
.configurationDisplayName("Multiple followers")
@ -70,7 +70,7 @@ struct MultiFollowersCountWidget: Widget {
}
private extension MultiFollowersCountWidgetProvider {
func loadCurrentEntry(for configuration: MultiFollowersCountSmallIntent, in context: Context, completion: @escaping (MultiFollowersCountEntry) -> Void) {
func loadCurrentEntry(for configuration: MultiFollowersCountIntent, in context: Context, completion: @escaping (MultiFollowersCountEntry) -> Void) {
Task {
guard
let authBox = WidgetExtension.appContext

View File

@ -186,7 +186,7 @@
<key>INIntentLastParameterTag</key>
<integer>6</integer>
<key>INIntentName</key>
<string>MultiFollowersCountSmall</string>
<string>MultiFollowersCount</string>
<key>INIntentParameters</key>
<array>
<dict>
@ -351,7 +351,7 @@
</array>
</dict>
<key>INIntentTitle</key>
<string>Multi Followers Count Small</string>
<string>Multi Followers Count</string>
<key>INIntentTitleID</key>
<string>e0W2wo</string>
<key>INIntentType</key>