Fix black text in drag preview when moving a chat to a folder
.draggable()'s default drag-preview snapshot wasn't inheriting the app's dark appearance, rendering the conversation name in black on a transparent background while dragging. Supply an explicit preview view instead — white text on the accent color pill — so it stays legible for the duration of the drag, independent of the row's own (already-correct) rendering before and after the move.
This commit is contained in:
@@ -230,7 +230,14 @@ struct SidebarView: View {
|
||||
? Color.oaiAccent.opacity(0.15)
|
||||
: Color.clear
|
||||
)
|
||||
.draggable(conversation.id.uuidString)
|
||||
.draggable(conversation.id.uuidString) {
|
||||
Text(conversation.name)
|
||||
.font(.system(size: 13, weight: .medium))
|
||||
.foregroundStyle(.white)
|
||||
.padding(.horizontal, 10)
|
||||
.padding(.vertical, 6)
|
||||
.background(Color.oaiAccent, in: RoundedRectangle(cornerRadius: 6))
|
||||
}
|
||||
.swipeActions(edge: .trailing, allowsFullSwipe: false) {
|
||||
Button(role: .destructive) {
|
||||
deleteConversation(conversation)
|
||||
|
||||
@@ -348,7 +348,14 @@ struct ConversationListView: View {
|
||||
: Color.clear
|
||||
)
|
||||
.id(conversation.id)
|
||||
.draggable(conversation.id.uuidString)
|
||||
.draggable(conversation.id.uuidString) {
|
||||
Text(conversation.name)
|
||||
.font(.system(size: 13, weight: .medium))
|
||||
.foregroundStyle(.white)
|
||||
.padding(.horizontal, 10)
|
||||
.padding(.vertical, 6)
|
||||
.background(Color.oaiAccent, in: RoundedRectangle(cornerRadius: 6))
|
||||
}
|
||||
.swipeActions(edge: .trailing, allowsFullSwipe: false) {
|
||||
Button(role: .destructive) {
|
||||
deleteConversation(conversation)
|
||||
|
||||
Reference in New Issue
Block a user