Skip to content

Commit c7f7e4c

Browse files
authored
fix: update search results text colors for dark mode compatibility (#24)
- Changed title text to use .primaryText instead of generic .bodyText - Changed content text to use .secondaryText for better hierarchy - Removed redundant .foregroundColor modifier on parent VStack - Ensures consistent text visibility in both light and dark modes
1 parent fd656e2 commit c7f7e4c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

V2er/View/Explore/SearchPage.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,16 +111,17 @@ fileprivate struct SearchResultItemView: View {
111111
VStack(alignment: .leading) {
112112
Text(data.title)
113113
.fontWeight(.semibold)
114+
.foregroundColor(.primaryText)
114115
.greedyWidth(.leading)
115116
.lineLimit(2)
116117
Text(data.content)
118+
.foregroundColor(.secondaryText)
117119
.lineLimit(5)
118120
.padding(.vertical, 5)
119121
Text("\(data.creator)\(data.created) 发表, \(data.replyNum) 回复")
120122
.font(.footnote)
121123
.foregroundColor(Color.tintColor.opacity(0.8))
122124
}
123-
.foregroundColor(Color.bodyText)
124125
.greedyWidth()
125126
.padding(padding)
126127
.background(Color.itemBg)

0 commit comments

Comments
 (0)