Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public struct WrappingHStack<Model, V>: View where Model: Hashable, V: View {
private func generateContent(in geometry: GeometryProxy) -> some View {
var width = CGFloat.zero
var height = CGFloat.zero
var previousHight = CGFloat.zero

return ZStack(alignment: .topLeading) {
ForEach(self.models, id: \.self) { models in
Expand All @@ -60,14 +61,15 @@ public struct WrappingHStack<Model, V>: View where Model: Hashable, V: View {
.alignmentGuide(.leading, computeValue: { dimension in
if (abs(width - dimension.width) > geometry.size.width) {
width = 0
height -= dimension.height
height -= previousHight
}
let result = width
if models == self.models.last! {
width = 0
} else {
width -= dimension.width
}
previousHight = dimension.height
return result
})
.alignmentGuide(.top, computeValue: { _ in
Expand Down
2 changes: 1 addition & 1 deletion Horizon/Horizon/Resources/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@
"Hello, Career!" : {

},
"Hello! Which course you'd like to discuss today?" : {
"Hello! Which course would you like to discuss today?" : {

},
"Helsinki (+02:00/+03:00)" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class AssistSelectCourseGoal: AssistGoal {
}

private func initialPrompt(history: [AssistChatMessage]) -> AnyPublisher<AssistChatMessage?, any Error> {
let promptFirstTime = String(localized: "Hello! Which course you'd like to discuss today?", bundle: .horizon)
let promptFirstTime = String(localized: "Hello! Which course would you like to discuss today?", bundle: .horizon)
let promptAgain = String(localized: "Sorry, can we try that again? Which course is it you'd like to discuss?", bundle: .horizon)
let didIJustAskThis = history.count > 1 && history[history.count - 2].text?.contains(promptFirstTime) == true
let prompt = didIJustAskThis ? promptAgain : promptFirstTime
Expand Down