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/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/readmes/%7B%7D/%7Bthis.state.thumbnail%7D?a=commitdiff_plain;h=a6b59b78d2ab9f889442d6af43eed5efd2b23469;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 6d8b04c..1bfd40e 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, }); } }