Improved mute alerting (#1355)

* Use a simpler mute alert when viewing a post by a muted user

* Dont mute self-QPs when we're overriding a mute

* Fix types
This commit is contained in:
Paul Frazee 2023-09-01 12:30:02 -07:00 committed by GitHub
parent 3e96373903
commit 419ac2d0df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 63 additions and 6 deletions

View file

@ -9,7 +9,6 @@ import {useStores} from 'state/index'
export function PostAlerts({
moderation,
includeMute,
style,
}: {
moderation: ModerationUI
@ -19,10 +18,7 @@ export function PostAlerts({
const store = useStores()
const pal = usePalette('default')
const shouldAlert =
!!moderation.cause &&
(moderation.alert ||
(includeMute && moderation.blur && moderation.cause?.type === 'muted'))
const shouldAlert = !!moderation.cause && moderation.alert
if (!shouldAlert) {
return null
}