macOS widgets

This commit is contained in:
Hillel Coren 2023-06-21 18:46:01 +03:00
parent fec45409f4
commit e63f176f8e
1 changed files with 7 additions and 0 deletions

View File

@ -47,6 +47,13 @@ class IntentHandler: INExtension, ConfigurationIntentHandling {
return INObjectCollection(items: currencies)
}
func defaultCurrency(for intent: ConfigurationIntent) -> Currency? {
let widgetData = loadWidgetData()
let company = widgetData.companies[widgetData.companyId];
let currency = company?.currencies[company!.currencyId];
return Currency(identifier: currency!.id, display: currency!.name)
}
override func handler(for intent: INIntent) -> Any {
return self
}