diff --git a/Packages/Status/Sources/Status/Row/StatusRowView.swift b/Packages/Status/Sources/Status/Row/StatusRowView.swift index 6f79d271..7191c8c4 100644 --- a/Packages/Status/Sources/Status/Row/StatusRowView.swift +++ b/Packages/Status/Sources/Status/Row/StatusRowView.swift @@ -16,7 +16,6 @@ public struct StatusRowView: View { @Environment(\.accessibilityVoiceOverEnabled) private var accessibilityVoiceOverEnabled @Environment(\.isStatusFocused) private var isFocused @Environment(\.indentationLevel) private var indentationLevel - @Environment(\.isHomeTimeline) private var isHomeTimeline @Environment(QuickLook.self) private var quickLook @Environment(Theme.self) private var theme @@ -57,12 +56,13 @@ public struct StatusRowView: View { EmptyView() } } else { - if !isCompact, theme.avatarPosition == .leading { + if !isCompact { Group { + StatusRowTagView(viewModel: viewModel) StatusRowReblogView(viewModel: viewModel) StatusRowReplyView(viewModel: viewModel) } - .padding(.leading, AvatarView.FrameConfig.status.width + .statusColumnsSpacing) + .padding(.leading, theme.avatarPosition == .top ? 0 : AvatarView.FrameConfig.status.width + .statusColumnsSpacing) } HStack(alignment: .top, spacing: .statusColumnsSpacing) { if !isCompact, @@ -75,13 +75,6 @@ public struct StatusRowView: View { } } VStack(alignment: .leading, spacing: .statusComponentSpacing) { - if !isCompact, theme.avatarPosition == .top { - StatusRowReblogView(viewModel: viewModel) - StatusRowReplyView(viewModel: viewModel) - if isHomeTimeline { - StatusRowTagView(viewModel: viewModel) - } - } if !isCompact { StatusRowHeaderView(viewModel: viewModel) } diff --git a/Packages/Status/Sources/Status/Row/Subviews/StatusRowTagView.swift b/Packages/Status/Sources/Status/Row/Subviews/StatusRowTagView.swift index 7285a1b9..9dd83916 100644 --- a/Packages/Status/Sources/Status/Row/Subviews/StatusRowTagView.swift +++ b/Packages/Status/Sources/Status/Row/Subviews/StatusRowTagView.swift @@ -4,10 +4,13 @@ import SwiftUI struct StatusRowTagView: View { @Environment(CurrentAccount.self) private var currentAccount + @Environment(\.isHomeTimeline) private var isHomeTimeline + let viewModel: StatusRowViewModel var body: some View { - if let tag = viewModel.finalStatus.content.links.first(where: { link in + if isHomeTimeline, + let tag = viewModel.finalStatus.content.links.first(where: { link in link.type == .hashtag && currentAccount.tags.contains(where: { $0.name.lowercased() == link.title.lowercased() }) }) { Text("#\(tag.title)")