mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-12-23 03:11:25 +00:00
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:
parent
ab74d3ad90
commit
22f2b47243
1 changed files with 2 additions and 2 deletions
|
@ -128,10 +128,10 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
|||
|
||||
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),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue