From e6909d4cd1e67f5ebb890eaa34be3c6dbf2b2bdd Mon Sep 17 00:00:00 2001 From: Alec Armbruster <35377827+alectrocute@users.noreply.github.com> Date: Mon, 26 Jun 2023 09:25:00 -0400 Subject: [PATCH] fix bug collapsing previews when voting --- 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 449f696..c423b2c 100644 --- a/src/shared/components/post/post-listing.tsx +++ b/src/shared/components/post/post-listing.tsx @@ -42,6 +42,7 @@ import { SavePost, TransferCommunity, } from "lemmy-js-client"; +import deepEqual from "lodash.isequal"; import { relTags } from "../../config"; import { BanType, @@ -168,7 +169,7 @@ export class PostListing extends Component { } componentWillReceiveProps(nextProps: PostListingProps) { - if (this.props !== nextProps) { + if (!deepEqual(this.props, nextProps)) { this.setState({ purgeLoading: false, reportLoading: false, @@ -183,7 +184,6 @@ export class PostListing extends Component { addModLoading: false, addAdminLoading: false, transferLoading: false, - imageExpanded: false, }); } } -- 2.44.1