Fix reasons check

This commit is contained in:
Thomas Ricouard 2023-12-27 17:12:48 +01:00
parent 2b16b10987
commit e53a3d0f61
4 changed files with 6 additions and 6 deletions

View file

@ -94,7 +94,7 @@ struct NotificationRowView: View {
.frame(height: AvatarView.FrameConfig.status.size.height + 2)
}.offset(y: -1)
}
if reasons.isEmpty {
if !reasons.contains(.placeholder) {
HStack(spacing: 0) {
EmojiTextApp(.init(stringValue: notification.accounts[0].safeDisplayName),
emojis: notification.accounts[0].emojis,

View file

@ -96,7 +96,7 @@ public struct StatusRowView: View {
accessibilityActions
}
}
if reasons.isEmpty,
if !reasons.contains(.placeholder),
viewModel.showActions, isFocused || theme.statusActionsDisplay != .none,
!isInCaptureMode {
StatusRowActionsView(viewModel: viewModel)
@ -115,7 +115,7 @@ public struct StatusRowView: View {
}
.onAppear {
viewModel.markSeen()
if reasons.isEmpty {
if !reasons.contains(.placeholder) {
if !isCompact, viewModel.embeddedStatus == nil {
Task {
await viewModel.loadEmbeddedStatus()

View file

@ -20,7 +20,7 @@ struct StatusRowContentView: View {
if !viewModel.displaySpoiler {
StatusRowTextView(viewModel: viewModel)
if reasons.isEmpty {
if !reasons.contains(.placeholder) {
StatusRowTranslateView(viewModel: viewModel)
}
if let poll = viewModel.finalStatus.poll {

View file

@ -53,13 +53,13 @@ struct StatusRowHeaderView: View {
.lineLimit(1)
.accountPopover(viewModel.finalStatus.account)
if redactionReasons.isEmpty {
if !redactionReasons.contains(.placeholder) {
accountBadgeView
.font(.footnote)
}
}
.layoutPriority(1)
if redactionReasons.isEmpty {
if !redactionReasons.contains(.placeholder) {
if theme.avatarPosition == .leading {
dateView
} else {