Do not auto expand media if blur_nsfw is active and the post is NSFW (#2305)

* Do not auto expand media if blur_nsfw is active and the post is NSFW flagged

* Update src/shared/components/post/post-listing.tsx

* Update src/shared/components/post/post-listing.tsx

---------

Co-authored-by: SleeplessOne1917 <28871516+SleeplessOne1917@users.noreply.github.com>
This commit is contained in:
İsmail Karslı 2023-12-31 03:47:27 +03:00 committed by GitHub
parent ab74d3ad90
commit 22f2b47243
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -128,10 +128,10 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
componentDidMount(): void { componentDidMount(): void {
if (UserService.Instance.myUserInfo) { if (UserService.Instance.myUserInfo) {
const { auto_expand, blur_nsfw } = UserService.Instance.myUserInfo.local_user_view.local_user;
this.setState({ this.setState({
imageExpanded: imageExpanded:
UserService.Instance.myUserInfo.local_user_view.local_user auto_expand && !(blur_nsfw && this.postView.post.nsfw),
.auto_expand,
}); });
} }
} }