Skip to content

Commit

Permalink
Register material design font for Assist widget (#2737)
Browse files Browse the repository at this point in the history
  • Loading branch information
bgoncal committed Apr 25, 2024
1 parent 31e62c2 commit 995df18
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@
<EnvironmentVariables>
<EnvironmentVariable
key = "_XCWidgetKind"
value = ""
isEnabled = "NO">
value = "WidgetAssist"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "_XCWidgetDefaultView"
Expand All @@ -108,8 +108,8 @@
</EnvironmentVariable>
<EnvironmentVariable
key = "_XCWidgetFamily"
value = "medium"
isEnabled = "NO">
value = "systemSmall"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
</LaunchAction>
Expand Down
4 changes: 2 additions & 2 deletions Sources/Extensions/Widgets/Assist/WidgetAssistProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ struct WidgetAssistProvider: IntentTimelineProvider {
return
}
let entry = WidgetAssistEntry(
server: configuration.server,
pipeline: configuration.pipeline,
server: server,
pipeline: pipeline,
withVoice: Bool(truncating: configuration.withVoice ?? 1)
)
completion(entry)
Expand Down
6 changes: 6 additions & 0 deletions Sources/Extensions/Widgets/Assist/WidgetAssistView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ struct WidgetAssistView: View {
return entry.pipeline?.displayString ?? L10n.Widgets.Assist.unknownConfiguration
}

init(entry: WidgetAssistEntry) {
self.entry = entry

MaterialDesignIcons.register()
}

var body: some View {
content
}
Expand Down

0 comments on commit 995df18

Please sign in to comment.