mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-01-22 13:58:08 +00:00
Fix StatusRowContentView invade SwipeActions area (#2007)
* Fix StatusRowContentView invade SwipeActions area * ./ add padding inside StatusRowMediaPreviewView
This commit is contained in:
parent
7d47834903
commit
3782300b27
2 changed files with 26 additions and 24 deletions
|
@ -83,33 +83,33 @@ public struct StatusRowView: View {
|
||||||
viewModel.navigateToAccountDetail(account: viewModel.finalStatus.account)
|
viewModel.navigateToAccountDetail(account: viewModel.finalStatus.account)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
VStack(alignment: .leading, spacing: .statusComponentSpacing) {
|
if !isCompact {
|
||||||
if !isCompact {
|
StatusRowHeaderView(viewModel: viewModel)
|
||||||
StatusRowHeaderView(viewModel: viewModel)
|
}
|
||||||
|
}
|
||||||
|
VStack(alignment: .leading, spacing: .statusComponentSpacing) {
|
||||||
|
StatusRowContentView(viewModel: viewModel)
|
||||||
|
.contentShape(Rectangle())
|
||||||
|
.onTapGesture {
|
||||||
|
guard !isFocused else { return }
|
||||||
|
viewModel.navigateToDetail()
|
||||||
}
|
}
|
||||||
StatusRowContentView(viewModel: viewModel)
|
.accessibilityActions {
|
||||||
.contentShape(Rectangle())
|
if isFocused, viewModel.showActions {
|
||||||
.onTapGesture {
|
accessibilityActions
|
||||||
guard !isFocused else { return }
|
|
||||||
viewModel.navigateToDetail()
|
|
||||||
}
|
}
|
||||||
.accessibilityActions {
|
|
||||||
if isFocused, viewModel.showActions {
|
|
||||||
accessibilityActions
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if !reasons.contains(.placeholder),
|
|
||||||
viewModel.showActions, isFocused || theme.statusActionsDisplay != .none,
|
|
||||||
!isInCaptureMode
|
|
||||||
{
|
|
||||||
StatusRowActionsView(isBlockConfirmationPresented: $isBlockConfirmationPresented,
|
|
||||||
viewModel: viewModel)
|
|
||||||
.tint(isFocused ? theme.tintColor : .gray)
|
|
||||||
}
|
}
|
||||||
|
if !reasons.contains(.placeholder),
|
||||||
|
viewModel.showActions, isFocused || theme.statusActionsDisplay != .none,
|
||||||
|
!isInCaptureMode
|
||||||
|
{
|
||||||
|
StatusRowActionsView(isBlockConfirmationPresented: $isBlockConfirmationPresented,
|
||||||
|
viewModel: viewModel)
|
||||||
|
.tint(isFocused ? theme.tintColor : .gray)
|
||||||
|
}
|
||||||
|
|
||||||
if isFocused, !isCompact {
|
if isFocused, !isCompact {
|
||||||
StatusRowDetailView(viewModel: viewModel)
|
StatusRowDetailView(viewModel: viewModel)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,6 +54,7 @@ public struct StatusRowMediaPreviewView: View {
|
||||||
: CGSize(width: imageMaxHeight, height: imageMaxHeight),
|
: CGSize(width: imageMaxHeight, height: imageMaxHeight),
|
||||||
sensitive: sensitive
|
sensitive: sensitive
|
||||||
)
|
)
|
||||||
|
.padding(.horizontal, .layoutPadding)
|
||||||
.accessibilityElement(children: .ignore)
|
.accessibilityElement(children: .ignore)
|
||||||
.accessibilityLabel(Self.accessibilityLabel(for: attachments[0]))
|
.accessibilityLabel(Self.accessibilityLabel(for: attachments[0]))
|
||||||
.accessibilityAddTraits([.isButton, .isImage])
|
.accessibilityAddTraits([.isButton, .isImage])
|
||||||
|
@ -66,10 +67,11 @@ public struct StatusRowMediaPreviewView: View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.padding(.bottom, scrollBottomPadding)
|
.padding(.bottom, scrollBottomPadding)
|
||||||
|
.padding(.horizontal, .layoutPadding)
|
||||||
}
|
}
|
||||||
.scrollClipDisabled()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.padding(.horizontal, -1 * .layoutPadding)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ViewBuilder
|
@ViewBuilder
|
||||||
|
|
Loading…
Reference in a new issue