From bbda8c41b6b8d532b81e5351f3116f06c725e332 Mon Sep 17 00:00:00 2001 From: Nathan Mattes Date: Mon, 28 Aug 2023 12:58:46 +0200 Subject: [PATCH] Add post-visibility to notifications (#594) --- .../Share/View/Content/NotificationView+Configuration.swift | 3 +++ .../Sources/MastodonUI/View/Content/NotificationView.swift | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Mastodon/Scene/Share/View/Content/NotificationView+Configuration.swift b/Mastodon/Scene/Share/View/Content/NotificationView+Configuration.swift index 011435fff..576d2eadf 100644 --- a/Mastodon/Scene/Share/View/Content/NotificationView+Configuration.swift +++ b/Mastodon/Scene/Share/View/Content/NotificationView+Configuration.swift @@ -99,6 +99,9 @@ extension NotificationView { .store(in: &disposeBag) // timestamp viewModel.timestamp = notification.createAt + + viewModel.visibility = notification.status?.visibility ?? ._other("") + // notification type indicator Publishers.CombineLatest3( notification.publisher(for: \.typeRaw), diff --git a/MastodonSDK/Sources/MastodonUI/View/Content/NotificationView.swift b/MastodonSDK/Sources/MastodonUI/View/Content/NotificationView.swift index 47b9ea65e..8900b4cb3 100644 --- a/MastodonSDK/Sources/MastodonUI/View/Content/NotificationView.swift +++ b/MastodonSDK/Sources/MastodonUI/View/Content/NotificationView.swift @@ -299,9 +299,6 @@ extension NotificationView { authorSecondaryMetaContainer.addArrangedSubview(dateTrailingDotLabel) dateTrailingDotLabel.setContentCompressionResistancePriority(.required, for: .horizontal) - authorSecondaryMetaContainer.addArrangedSubview(dateTrailingDotLabel) - dateTrailingDotLabel.setContentCompressionResistancePriority(.required, for: .horizontal) - authorSecondaryMetaContainer.addArrangedSubview(visibilityIconImageView) NSLayoutConstraint.activate([ visibilityIconImageView.heightAnchor.constraint(equalTo: authorUsernameLabel.heightAnchor),