review changes

This commit is contained in:
zeppi 2021-04-03 15:31:57 -04:00 committed by Sean Yesmunt
parent 14685e11af
commit 3c3fc90b6a
3 changed files with 4 additions and 6 deletions

View file

@ -19,6 +19,10 @@ type Props = {
}; };
class ModalPublishSuccess extends React.PureComponent<Props> { class ModalPublishSuccess extends React.PureComponent<Props> {
componentDidMount() {
const { clearPublish } = this.props;
clearPublish();
}
render() { render() {
const { closeModal, clearPublish, navigate, uri, isEdit, filePath, lbryFirstError, claim } = this.props; const { closeModal, clearPublish, navigate, uri, isEdit, filePath, lbryFirstError, claim } = this.props;
// $FlowFixMe // $FlowFixMe
@ -43,8 +47,6 @@ class ModalPublishSuccess extends React.PureComponent<Props> {
publishMessage = __('Your file is now pending on LBRY. It will take a few minutes to appear for other users.'); publishMessage = __('Your file is now pending on LBRY. It will take a few minutes to appear for other users.');
} }
clearPublish();
function handleClose() { function handleClose() {
closeModal(); closeModal();
} }

View file

@ -80,7 +80,6 @@ const ModalPublishPreview = (props: Props) => {
previewResponse.outputs[0] && previewResponse.outputs[0].value && !previewResponse.outputs[0].value.source; 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 // leave the confirm modal up if we're not going straight to upload/reflecting
// @if TARGET='web' // @if TARGET='web'
React.useEffect(() => { React.useEffect(() => {
if (publishing && !livestream) { if (publishing && !livestream) {
closeModal(); closeModal();
@ -88,9 +87,7 @@ const ModalPublishPreview = (props: Props) => {
closeModal(); closeModal();
} }
}, [publishSuccess, publishing, livestream]); }, [publishSuccess, publishing, livestream]);
// @endif // @endif
// const waitForSuccess = false;
function onConfirmed() { function onConfirmed() {
// Publish for real: // Publish for real:
publish(getFilePathName(filePath), false); publish(getFilePathName(filePath), false);

View file

@ -25,7 +25,6 @@ export default function LivestreamPage(props: Props) {
const STREAMING_POLL_INTERVAL_IN_MS = 10000; const STREAMING_POLL_INTERVAL_IN_MS = 10000;
const LIVESTREAM_CLAIM_POLL_IN_MS = 60000; 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(() => { React.useEffect(() => {
let checkClaimsInterval; let checkClaimsInterval;
function checkHasLivestreamClaim() { function checkHasLivestreamClaim() {