From 3c3fc90b6a44878add2210d0964d6069bd83fbc8 Mon Sep 17 00:00:00 2001 From: zeppi Date: Sat, 3 Apr 2021 15:31:57 -0400 Subject: [PATCH] review changes --- ui/modal/modalPublish/view.jsx | 6 ++++-- ui/modal/modalPublishPreview/view.jsx | 3 --- ui/page/livestream/view.jsx | 1 - 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/ui/modal/modalPublish/view.jsx b/ui/modal/modalPublish/view.jsx index 9caa98b0c..342c6cdc8 100644 --- a/ui/modal/modalPublish/view.jsx +++ b/ui/modal/modalPublish/view.jsx @@ -19,6 +19,10 @@ type Props = { }; class ModalPublishSuccess extends React.PureComponent { + componentDidMount() { + const { clearPublish } = this.props; + clearPublish(); + } render() { const { closeModal, clearPublish, navigate, uri, isEdit, filePath, lbryFirstError, claim } = this.props; // $FlowFixMe @@ -43,8 +47,6 @@ class ModalPublishSuccess extends React.PureComponent { publishMessage = __('Your file is now pending on LBRY. It will take a few minutes to appear for other users.'); } - clearPublish(); - function handleClose() { closeModal(); } diff --git a/ui/modal/modalPublishPreview/view.jsx b/ui/modal/modalPublishPreview/view.jsx index ca55d498c..e79621a90 100644 --- a/ui/modal/modalPublishPreview/view.jsx +++ b/ui/modal/modalPublishPreview/view.jsx @@ -80,7 +80,6 @@ const ModalPublishPreview = (props: Props) => { previewResponse.outputs[0] && previewResponse.outputs[0].value && !previewResponse.outputs[0].value.source; // leave the confirm modal up if we're not going straight to upload/reflecting // @if TARGET='web' - React.useEffect(() => { if (publishing && !livestream) { closeModal(); @@ -88,9 +87,7 @@ const ModalPublishPreview = (props: Props) => { closeModal(); } }, [publishSuccess, publishing, livestream]); - // @endif - // const waitForSuccess = false; function onConfirmed() { // Publish for real: publish(getFilePathName(filePath), false); diff --git a/ui/page/livestream/view.jsx b/ui/page/livestream/view.jsx index 8115dac8c..0f77f9d53 100644 --- a/ui/page/livestream/view.jsx +++ b/ui/page/livestream/view.jsx @@ -25,7 +25,6 @@ export default function LivestreamPage(props: Props) { const STREAMING_POLL_INTERVAL_IN_MS = 10000; const LIVESTREAM_CLAIM_POLL_IN_MS = 60000; - // the component needs to check if the channel has published a new livestream, so we know if it should check React.useEffect(() => { let checkClaimsInterval; function checkHasLivestreamClaim() {