From 22f2b4724334dc366342b7d3f802ee4890605d03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0smail=20Karsl=C4=B1?= <17887754+ismailkarsli@users.noreply.github.com> Date: Sun, 31 Dec 2023 03:47:27 +0300 Subject: [PATCH] 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> --- src/shared/components/post/post-listing.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/components/post/post-listing.tsx b/src/shared/components/post/post-listing.tsx index 03546783..f99e6a77 100644 --- a/src/shared/components/post/post-listing.tsx +++ b/src/shared/components/post/post-listing.tsx @@ -128,10 +128,10 @@ export class PostListing extends Component { componentDidMount(): void { if (UserService.Instance.myUserInfo) { + const { auto_expand, blur_nsfw } = UserService.Instance.myUserInfo.local_user_view.local_user; this.setState({ imageExpanded: - UserService.Instance.myUserInfo.local_user_view.local_user - .auto_expand, + auto_expand && !(blur_nsfw && this.postView.post.nsfw), }); } }