mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-12-16 04:06:36 +00:00
Layout fix & tweak
This commit is contained in:
parent
aa41f24de9
commit
e0563122a7
2 changed files with 7 additions and 11 deletions
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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)")
|
||||
|
|
Loading…
Reference in a new issue