]> Untitled Git - lemmy-ui.git/commitdiff
partially revert change
authorAlec Armbruster <35377827+alectrocute@users.noreply.github.com>
Mon, 26 Jun 2023 21:04:19 +0000 (17:04 -0400)
committerAlec Armbruster <35377827+alectrocute@users.noreply.github.com>
Mon, 26 Jun 2023 21:04:19 +0000 (17:04 -0400)
src/shared/components/post/post-listing.tsx

index dd6ba0cdab90bf18578401bf74579c5747f9fd0f..7b75818c40adf4e1833a1fab0914bfdee35747cc 100644 (file)
@@ -167,6 +167,26 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
     this.handleEditCancel = this.handleEditCancel.bind(this);
   }
 
+  componentWillReceiveProps(nextProps: PostListingProps) {
+    if (this.props !== nextProps) {
+      this.setState({
+        purgeLoading: false,
+        reportLoading: false,
+        blockLoading: false,
+        lockLoading: false,
+        deleteLoading: false,
+        removeLoading: false,
+        saveLoading: false,
+        featureCommunityLoading: false,
+        featureLocalLoading: false,
+        banLoading: false,
+        addModLoading: false,
+        addAdminLoading: false,
+        transferLoading: false,
+      });
+    }
+  }
+
   get postView(): PostView {
     return this.props.post_view;
   }