Switch the document preview to a file dropped onto it

This commit is contained in:
Thorsten Sommer committed 2026-09-13 17:51:25 +02:00
1 parent ae793c07f7
commit 6ddb21a6dc
5 files changed
+276 -63

No files matched your search

@@ -163,6 +163,19 @@ public partial class ReviewAttachmentsDialog : MSGComponentBase
{ x => x.Document, fileAttachment },
};
//
// Give the preview our own way of attaching, so a file dropped onto it lands in this list
// as well. Not when we cannot attach anything ourselves: the preview would then claim every
// drop and do nothing with it.
//
if (this.CanAttach)
{
dialogParameters.Add(x => x.AttachPaths, this.AttachPathsAsync);
if (this.IsAttachingUnavailable is not null)
dialogParameters.Add(x => x.IsAttachingUnavailable, this.IsAttachingUnavailable);
}
await this.DialogService.ShowAsync<DocumentCheckDialog>(T("Document Preview"), dialogParameters, DialogOptions.FULLSCREEN);
}
}