Fix “hide sensitive content” button being hidden (#1024)

This commit is contained in:
Jed Fox 2023-04-22 15:46:34 -04:00 committed by GitHub
parent c638d86cb7
commit 17dce25e07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -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