IceCubesApp/IceCubesAppWidgetsExtension/ListsWidget/ListsWidgetConfiguration.swift

22 lines
649 B
Swift
Raw Permalink Normal View History

2024-05-15 07:27:35 +00:00
import AppIntents
import WidgetKit
struct ListsWidgetConfiguration: WidgetConfigurationIntent {
static let title: LocalizedStringResource = "List Widget Configuration"
2024-05-15 07:27:35 +00:00
static let description = IntentDescription("Choose the account and list for this widget")
@Parameter(title: "Account")
var account: AppAccountEntity?
2024-05-15 07:27:35 +00:00
@Parameter(title: "List")
var timeline: ListEntity?
2024-05-15 07:27:35 +00:00
}
extension ListsWidgetConfiguration {
static var previewAccount: LatestPostsWidgetConfiguration {
let intent = LatestPostsWidgetConfiguration()
intent.account = .init(account: .init(server: "Test", accountName: "Test account"))
return intent
}
}