Show first image when sharing (#1199)

This commit is contained in:
Nathan Mattes 2023-12-20 17:45:05 +01:00
parent a236e114fd
commit 8e14121a6b
1 changed files with 4 additions and 0 deletions

View File

@ -71,6 +71,10 @@ extension DataSourceFacade {
url: status.entity.account.avatarImageURLWithFallback(domain: status.entity.account.domain ?? ""),
filter: ScaledToSizeFilter(size: CGSize.authorAvatarButtonSize)
).itemProvider
if let firstAssetURL = status.attachments.first?.previewURL, let url = URL(string: firstAssetURL) {
metadata.imageProvider = ImageProvider(url: url).itemProvider
}
}
] as [Any]
}()