Fix document preview

This commit is contained in:
Benoit Martins 2026-03-18 15:50:21 +01:00
parent 83acef02d7
commit b82156d2f2
2 changed files with 4 additions and 2 deletions

View file

@ -2,6 +2,6 @@ import Foundation
public enum AppGitInfo {
public static let branch = "master"
public static let commit = "068d2d290"
public static let commit = "83acef02d"
public static let tag = "6.1.0-alpha"
}

View file

@ -68,7 +68,7 @@ struct ConversationDocumentsListFragment: View {
VStack(spacing: 0) {
List {
ForEach(conversationDocumentsListViewModel.documentsList, id: \.path) { file in
DocumentRow(file: file)
DocumentRow(viewModel: conversationDocumentsListViewModel, file: file)
.padding(.vertical, 4)
.padding(.horizontal, 8)
.listRowInsets(EdgeInsets(top: 0, leading: 0, bottom: 0, trailing: 0))
@ -123,6 +123,7 @@ struct ConversationDocumentsListFragment: View {
struct DocumentRow: View {
@ObservedObject var viewModel: ConversationDocumentsListViewModel
@State private var selectedURLAttachment: URL?
@ObservedObject var file: FileModel
@ -159,6 +160,7 @@ struct DocumentRow: View {
.padding(.horizontal, 10)
.frame(maxWidth: .infinity, alignment: .leading)
}
.quickLookPreview($selectedURLAttachment, in: viewModel.documentsList.compactMap { URL(fileURLWithPath: $0.originalPath) })
.background(.white)
.clipShape(RoundedRectangle(cornerRadius: 10))
.onTapGesture {