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:
2026-07-28 13:30:53 +02:00
parent 7fbac5e809
commit 03f84ebe01
2 changed files with 16 additions and 2 deletions
+8 -1
View File
@@ -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)
+8 -1
View File
@@ -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)