StatusRow: Flatify the hierarchy to work around iOS 16.4 issues

This commit is contained in:
Thomas Ricouard 2023-03-01 17:34:03 +01:00
parent 87ef2f2a39
commit 43a4551d9b

View file

@ -26,19 +26,16 @@ public struct StatusRowView: View {
}
public var body: some View {
VStack(alignment: .leading) {
let status: AnyStatus = viewModel.status.reblog ?? viewModel.status
if viewModel.isFiltered, let filter = viewModel.filter {
switch filter.filter.filterAction {
case .warn:
makeFilterView(filter: filter.filter)
.listRowBackground(viewModel.highlightRowColor)
case .hide:
EmptyView()
.listRowSeparator(.hidden)
.listRowInsets(.init())
}
} else {
let status: AnyStatus = viewModel.status.reblog ?? viewModel.status
VStack(alignment: .leading) {
if !isCompact, theme.avatarPosition == .leading {
StatusRowReblogView(viewModel: viewModel)
StatusRowReplyView(viewModel: viewModel)
@ -85,6 +82,7 @@ public struct StatusRowView: View {
}
}
}
}
.onAppear {
viewModel.markSeen()
if reasons.isEmpty {
@ -153,7 +151,6 @@ public struct StatusRowView: View {
client: client)
)
}
}
@ViewBuilder
private var accesibilityActions: some View {