From b82156d2f25311906d0fd6df37afbf2c84ec25db Mon Sep 17 00:00:00 2001 From: Benoit Martins Date: Wed, 18 Mar 2026 15:50:21 +0100 Subject: [PATCH] Fix document preview --- Linphone/GeneratedGit.swift | 2 +- .../Fragments/ConversationDocumentsListFragment.swift | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Linphone/GeneratedGit.swift b/Linphone/GeneratedGit.swift index 050450863..2c1a62063 100644 --- a/Linphone/GeneratedGit.swift +++ b/Linphone/GeneratedGit.swift @@ -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" } diff --git a/Linphone/UI/Main/Conversations/Fragments/ConversationDocumentsListFragment.swift b/Linphone/UI/Main/Conversations/Fragments/ConversationDocumentsListFragment.swift index 8ef3a7467..1a918e583 100644 --- a/Linphone/UI/Main/Conversations/Fragments/ConversationDocumentsListFragment.swift +++ b/Linphone/UI/Main/Conversations/Fragments/ConversationDocumentsListFragment.swift @@ -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 {