[APP-639] Improve nsfw handling & force hidden on iOS (#605)

* Identify adult content labels and handle them more specifically

* Change adult content defaults to more conservative settings

* Add an adultcontentenabled override that prohibits access on iOS

* Improve usability of the content hider

* Fix lint
This commit is contained in:
Paul Frazee 2023-05-09 00:43:20 -05:00 committed by GitHub
parent 7a176b3fdf
commit b756a27958
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 223 additions and 62 deletions

View file

@ -24,6 +24,7 @@ import {PostEmbeds} from '../util/post-embeds'
import {PostCtrls} from '../util/PostCtrls'
import {PostHider} from '../util/moderation/PostHider'
import {ContentHider} from '../util/moderation/ContentHider'
import {ImageHider} from '../util/moderation/ImageHider'
import {ErrorMessage} from '../util/error/ErrorMessage'
import {usePalette} from 'lib/hooks/usePalette'
import {formatCount} from '../util/numeric/format'
@ -234,7 +235,9 @@ export const PostThreadItem = observer(function PostThreadItem({
/>
</View>
) : undefined}
<PostEmbeds embed={item.post.embed} style={s.mb10} />
<ImageHider moderation={item.moderation.view} style={s.mb10}>
<PostEmbeds embed={item.post.embed} style={s.mb10} />
</ImageHider>
</ContentHider>
<View style={[s.mt2, s.mb10]}>
<Text style={pal.textLight}>{niceDate(item.post.indexedAt)}</Text>
@ -366,7 +369,9 @@ export const PostThreadItem = observer(function PostThreadItem({
/>
</View>
) : undefined}
<PostEmbeds embed={item.post.embed} style={s.mb10} />
<ImageHider style={s.mb10} moderation={item.moderation.thread}>
<PostEmbeds embed={item.post.embed} style={s.mb10} />
</ImageHider>
</ContentHider>
<PostCtrls
itemUri={itemUri}