mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-28 19:21:16 +00:00
StatusRow: Flatify the hierarchy to work around iOS 16.4 issues
This commit is contained in:
parent
87ef2f2a39
commit
43a4551d9b
1 changed files with 87 additions and 90 deletions
|
@ -26,19 +26,16 @@ public struct StatusRowView: View {
|
||||||
}
|
}
|
||||||
|
|
||||||
public var body: some View {
|
public var body: some View {
|
||||||
|
VStack(alignment: .leading) {
|
||||||
|
let status: AnyStatus = viewModel.status.reblog ?? viewModel.status
|
||||||
if viewModel.isFiltered, let filter = viewModel.filter {
|
if viewModel.isFiltered, let filter = viewModel.filter {
|
||||||
switch filter.filter.filterAction {
|
switch filter.filter.filterAction {
|
||||||
case .warn:
|
case .warn:
|
||||||
makeFilterView(filter: filter.filter)
|
makeFilterView(filter: filter.filter)
|
||||||
.listRowBackground(viewModel.highlightRowColor)
|
|
||||||
case .hide:
|
case .hide:
|
||||||
EmptyView()
|
EmptyView()
|
||||||
.listRowSeparator(.hidden)
|
|
||||||
.listRowInsets(.init())
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let status: AnyStatus = viewModel.status.reblog ?? viewModel.status
|
|
||||||
VStack(alignment: .leading) {
|
|
||||||
if !isCompact, theme.avatarPosition == .leading {
|
if !isCompact, theme.avatarPosition == .leading {
|
||||||
StatusRowReblogView(viewModel: viewModel)
|
StatusRowReblogView(viewModel: viewModel)
|
||||||
StatusRowReplyView(viewModel: viewModel)
|
StatusRowReplyView(viewModel: viewModel)
|
||||||
|
@ -85,6 +82,7 @@ public struct StatusRowView: View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
.onAppear {
|
.onAppear {
|
||||||
viewModel.markSeen()
|
viewModel.markSeen()
|
||||||
if reasons.isEmpty {
|
if reasons.isEmpty {
|
||||||
|
@ -153,7 +151,6 @@ public struct StatusRowView: View {
|
||||||
client: client)
|
client: client)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@ViewBuilder
|
@ViewBuilder
|
||||||
private var accesibilityActions: some View {
|
private var accesibilityActions: some View {
|
||||||
|
|
Loading…
Reference in a new issue