Fix bottom margins as requested (IOS-241)

This commit is contained in:
Nathan Mattes 2024-07-24 16:20:23 +02:00
parent 9da5b99b28
commit 8d535be84a
3 changed files with 7 additions and 23 deletions

View File

@ -39,9 +39,9 @@ extension NotificationView {
switch notification.entity.type { switch notification.entity.type {
case .follow: case .follow:
setAuthorContainerBottomPaddingViewDisplay() setAuthorContainerBottomPaddingViewDisplay(isHidden: true)
case .followRequest: case .followRequest:
setFollowRequestAdaptiveMarginContainerViewDisplay() setFollowRequestAdaptiveMarginContainerViewDisplay(isHidden: true)
case .mention, .status: case .mention, .status:
if let status = notification.status { if let status = notification.status {
statusView.configure(status: status) statusView.configure(status: status)

View File

@ -210,7 +210,7 @@ extension NotificationView {
containerStackView.topAnchor.constraint(equalTo: topAnchor), containerStackView.topAnchor.constraint(equalTo: topAnchor),
containerStackView.leadingAnchor.constraint(equalTo: leadingAnchor), containerStackView.leadingAnchor.constraint(equalTo: leadingAnchor),
containerStackView.trailingAnchor.constraint(equalTo: trailingAnchor), containerStackView.trailingAnchor.constraint(equalTo: trailingAnchor),
bottomAnchor.constraint(equalTo: containerStackView.bottomAnchor), bottomAnchor.constraint(equalTo: containerStackView.bottomAnchor, constant: 8),
]) ])
// author container: H - [ avatarButton | author meta container ] // author container: H - [ avatarButton | author meta container ]
@ -420,12 +420,12 @@ extension NotificationView {
extension NotificationView { extension NotificationView {
public func setAuthorContainerBottomPaddingViewDisplay() { public func setAuthorContainerBottomPaddingViewDisplay(isHidden: Bool = false) {
authorContainerViewBottomPaddingView.isHidden = false authorContainerViewBottomPaddingView.isHidden = isHidden
} }
public func setFollowRequestAdaptiveMarginContainerViewDisplay() { public func setFollowRequestAdaptiveMarginContainerViewDisplay(isHidden: Bool = false) {
followRequestAdaptiveMarginContainerView.isHidden = false followRequestAdaptiveMarginContainerView.isHidden = isHidden
} }
public func setStatusViewDisplay() { public func setStatusViewDisplay() {

View File

@ -290,19 +290,3 @@ extension ActionToolbarContainer {
set { } set { }
} }
} }
#if DEBUG
import SwiftUI
struct ActionToolbarContainer_Previews: PreviewProvider {
static var previews: some View {
Group {
UIViewPreview(width: 300) {
ActionToolbarContainer()
}
.previewLayout(.fixed(width: 300, height: 44))
.previewDisplayName("Inline")
}
}
}
#endif