From 03f84ebe01138bef6367a387d9235c8ef05e4ede Mon Sep 17 00:00:00 2001 From: Rune Olsen Date: Tue, 28 Jul 2026 13:30:53 +0200 Subject: [PATCH] Fix black text in drag preview when moving a chat to a folder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit .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. --- oAI/Views/Main/SidebarView.swift | 9 ++++++++- oAI/Views/Screens/ConversationListView.swift | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/oAI/Views/Main/SidebarView.swift b/oAI/Views/Main/SidebarView.swift index 93b3534..5fcfe72 100644 --- a/oAI/Views/Main/SidebarView.swift +++ b/oAI/Views/Main/SidebarView.swift @@ -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) diff --git a/oAI/Views/Screens/ConversationListView.swift b/oAI/Views/Screens/ConversationListView.swift index f3bc95e..9064d30 100644 --- a/oAI/Views/Screens/ConversationListView.swift +++ b/oAI/Views/Screens/ConversationListView.swift @@ -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)