Skip to content

Commit 6fcacbc

Browse files
committed
fix(ios): keep native markdown cards legible
1 parent da025e6 commit 6fcacbc

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatMarkdownBlockViews.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import SwiftUI
33
@MainActor
44
struct ChatCodeBlockView: View {
55
let block: ChatCodeBlock
6-
let textColor: Color
76

87
var body: some View {
98
VStack(alignment: .leading, spacing: 6) {
@@ -15,7 +14,7 @@ struct ChatCodeBlockView: View {
1514
ScrollView(.horizontal, showsIndicators: false) {
1615
Text(self.attributedCode)
1716
.font(OpenClawChatTypography.mono(size: 13, relativeTo: .footnote))
18-
.foregroundStyle(self.textColor)
17+
.foregroundStyle(OpenClawChatTheme.assistantText)
1918
.lineSpacing(2)
2019
.textSelection(.enabled)
2120
}
@@ -43,7 +42,6 @@ struct ChatCodeBlockView: View {
4342
@MainActor
4443
struct ChatMarkdownTableView: View {
4544
let table: ChatMarkdownTable
46-
let textColor: Color
4745

4846
var body: some View {
4947
ScrollView(.horizontal, showsIndicators: false) {
@@ -78,7 +76,7 @@ struct ChatMarkdownTableView: View {
7876
private func cell(_ text: String, column: Int, isHeader: Bool) -> some View {
7977
Text(self.inlineMarkdown(text))
8078
.font(isHeader ? OpenClawChatTypography.footnoteSemiBold : OpenClawChatTypography.footnote)
81-
.foregroundStyle(self.textColor)
79+
.foregroundStyle(OpenClawChatTheme.assistantText)
8280
.textSelection(.enabled)
8381
}
8482

apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatMarkdownRenderer.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ struct ChatMarkdownRenderer: View {
5050
.textSelection(.enabled)
5151
.lineSpacing(self.variant == .compact ? 2 : 4)
5252
case let .code(code):
53-
ChatCodeBlockView(block: code, textColor: self.textColor)
53+
ChatCodeBlockView(block: code)
5454
case let .table(table):
55-
ChatMarkdownTableView(table: table, textColor: self.textColor)
55+
ChatMarkdownTableView(table: table)
5656
}
5757
}
5858

0 commit comments

Comments
 (0)