Fix status embed

This commit is contained in:
Thomas Ricouard 2024-01-21 18:49:45 +01:00
parent b7937e3580
commit 78eee1e855
1 changed files with 14 additions and 6 deletions

View File

@ -31,12 +31,20 @@ struct StatusRowContentView: View {
!isCompact,
viewModel.isEmbedLoading || viewModel.embeddedStatus != nil
{
StatusEmbeddedView(status: viewModel.embeddedStatus ?? Status.placeholder(),
if let embeddedStatus = viewModel.embeddedStatus {
StatusEmbeddedView(status: embeddedStatus,
client: viewModel.client,
routerPath: viewModel.routerPath)
.fixedSize(horizontal: false, vertical: true)
.redacted(reason: viewModel.isEmbedLoading ? .placeholder : [])
.transition(.opacity)
} else {
StatusEmbeddedView(status: Status.placeholder(),
client: viewModel.client,
routerPath: viewModel.routerPath)
.fixedSize(horizontal: false, vertical: true)
.redacted(reason: .placeholder)
.transition(.opacity)
}
}
if !viewModel.finalStatus.mediaAttachments.isEmpty {