mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-02-04 00:17:30 +01:00
23 lines
692 B
Swift
23 lines
692 B
Swift
|
import WidgetKit
|
||
|
import AppIntents
|
||
|
|
||
|
struct HashtagPostsWidgetConfiguration: WidgetConfigurationIntent {
|
||
|
static let title: LocalizedStringResource = "Configuration"
|
||
|
static let description = IntentDescription("Choose the account and hashtag for this widget")
|
||
|
|
||
|
@Parameter(title: "Account")
|
||
|
var account: AppAccountEntity?
|
||
|
|
||
|
@Parameter(title: "Hashtag")
|
||
|
var hashgtag: String?
|
||
|
}
|
||
|
|
||
|
extension HashtagPostsWidgetConfiguration {
|
||
|
static var previewAccount: HashtagPostsWidgetConfiguration {
|
||
|
let intent = HashtagPostsWidgetConfiguration()
|
||
|
intent.account = .init(account: .init(server: "Test", accountName: "Test account"))
|
||
|
intent.hashgtag = "Mastodon"
|
||
|
return intent
|
||
|
}
|
||
|
}
|