From: Alec Armbruster <35377827+alectrocute@users.noreply.github.com> Date: Mon, 26 Jun 2023 13:25:00 +0000 (-0400) Subject: fix bug collapsing previews when voting X-Git-Url: http://these/git/%22https:/www.exeterceilidhs.net/static/%7Bthis.getImageSrc%28%29%7D?a=commitdiff_plain;h=e6909d4cd1e67f5ebb890eaa34be3c6dbf2b2bdd;p=lemmy-ui.git fix bug collapsing previews when voting --- 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, }); } }