diff --git a/ui/component/publishForm/view.jsx b/ui/component/publishForm/view.jsx
index 04088f02c..aff0f943f 100644
--- a/ui/component/publishForm/view.jsx
+++ b/ui/component/publishForm/view.jsx
@@ -26,6 +26,7 @@ import Card from 'component/common/card';
import I18nMessage from 'component/i18nMessage';
import * as PUBLISH_MODES from 'constants/publish_types';
import { useHistory } from 'react-router';
+import Spinner from 'component/spinner';
// @if TARGET='app'
import fs from 'fs';
@@ -403,6 +404,15 @@ function PublishForm(props: Props) {
}
}, [autoSwitchMode, editingURI, fileMimeType, myClaimForUri, mode, setMode, setAutoSwitchMode]);
+ if (publishing) {
+ return (
+
+
{__('Publishing...')}
+
+
+ );
+ }
+
// Editing claim uri
return (
diff --git a/ui/modal/modalPublish/view.jsx b/ui/modal/modalPublish/view.jsx
index 3bb9d10b9..02c47a77a 100644
--- a/ui/modal/modalPublish/view.jsx
+++ b/ui/modal/modalPublish/view.jsx
@@ -42,9 +42,9 @@ class ModalPublishSuccess extends React.PureComponent
{
} else {
publishMessage = __('Your video will appear on Odysee shortly.');
}
+ clearPublish();
function handleClose() {
- clearPublish();
closeModal();
}
diff --git a/ui/modal/modalPublishPreview/index.js b/ui/modal/modalPublishPreview/index.js
index aa4c031df..490485c87 100644
--- a/ui/modal/modalPublishPreview/index.js
+++ b/ui/modal/modalPublishPreview/index.js
@@ -7,6 +7,7 @@ import {
selectIsStillEditing,
selectMyChannelClaims,
SETTINGS,
+ doClearPublish,
} from 'lbry-redux';
import { selectFfmpegStatus, makeSelectClientSetting } from 'redux/selectors/settings';
import { doPublishDesktop } from 'redux/actions/publish';
@@ -25,6 +26,7 @@ const select = (state) => ({
const perform = (dispatch) => ({
publish: (filePath, preview) => dispatch(doPublishDesktop(filePath, preview)),
+ clearPublish: () => dispatch(doClearPublish()),
closeModal: () => dispatch(doHideModal()),
setEnablePublishPreview: (value) => dispatch(doSetClientSetting(SETTINGS.ENABLE_PUBLISH_PREVIEW, value)),
});
diff --git a/ui/modal/modalPublishPreview/view.jsx b/ui/modal/modalPublishPreview/view.jsx
index aa8003bb2..1f81010a2 100644
--- a/ui/modal/modalPublishPreview/view.jsx
+++ b/ui/modal/modalPublishPreview/view.jsx
@@ -43,6 +43,7 @@ type Props = {
myChannels: ?Array,
publishSuccess: boolean,
publishing: boolean,
+ clearPublish: () => void,
};
// class ModalPublishPreview extends React.PureComponent {
@@ -74,27 +75,26 @@ const ModalPublishPreview = (props: Props) => {
publishing,
publish,
closeModal,
+ clearPublish,
} = props;
const livestream =
// $FlowFixMe
previewResponse.outputs[0] && previewResponse.outputs[0].value && !previewResponse.outputs[0].value.source;
+ // @if TARGET='web'
React.useEffect(() => {
- console.log('publishSuccess', publishSuccess);
if (publishing && !livestream) {
- console.log('doPublishing');
closeModal();
}
if (publishSuccess && livestream) {
- console.log('doPublishSuccess');
+ clearPublish();
closeModal();
}
}, [publishSuccess, publishing, livestream]);
-
+ // @endif
// const waitForSuccess = false;
function onConfirmed() {
// Publish for real:
publish(getFilePathName(filePath), false);
- console.log('filePAath', filePath);
}
function getFilePathName(filePath: string | WebFile) {