]> 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)
committerJay Sitter <jay@jaysitter.com>
Tue, 27 Jun 2023 00:12:41 +0000 (20:12 -0400)
src/shared/components/post/post-listing.tsx

index f836642924787fcd2ddbc43ce287a49120d8f10e..19523f201005d9d866e07880c89bfd8e4b67e3a5 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;
   }