From 17dce25e071599f2712306866952876b1309b4d3 Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Sat, 22 Apr 2023 15:46:34 -0400 Subject: [PATCH] =?UTF-8?q?Fix=20=E2=80=9Chide=20sensitive=20content?= =?UTF-8?q?=E2=80=9D=20button=20being=20hidden=20(#1024)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MastodonUI/View/Content/StatusView+ViewModel.swift | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/MastodonSDK/Sources/MastodonUI/View/Content/StatusView+ViewModel.swift b/MastodonSDK/Sources/MastodonUI/View/Content/StatusView+ViewModel.swift index 0bdcb6243..f466fd819 100644 --- a/MastodonSDK/Sources/MastodonUI/View/Content/StatusView+ViewModel.swift +++ b/MastodonSDK/Sources/MastodonUI/View/Content/StatusView+ViewModel.swift @@ -311,14 +311,15 @@ extension StatusView.ViewModel { // statusView.spoilerBannerView.label.reset() } - if statusView.style == .editHistory, let spoilerContent = spoilerContent, !spoilerContent.string.isEmpty { + if statusView.style == .editHistory { + statusView.setContentSensitiveeToggleButtonDisplay(isDisplay: false) + } + if let spoilerContent = spoilerContent, !spoilerContent.string.isEmpty { statusView.historyContentWarningLabel.configure(content: spoilerContent) statusView.historyContentWarningAdaptiveMarginContainerView.isHidden = statusView.style != .editHistory - statusView.setContentSensitiveeToggleButtonDisplay(isDisplay: false) } else { statusView.historyContentWarningLabel.reset() statusView.historyContentWarningAdaptiveMarginContainerView.isHidden = true - statusView.setContentSensitiveeToggleButtonDisplay(isDisplay: false) } let paragraphStyle = statusView.contentMetaText.paragraphStyle