From d44fdde33e84dbbc92bf7fc8b92441cb35886066 Mon Sep 17 00:00:00 2001 From: DispatchCommit Date: Sat, 13 Mar 2021 18:49:42 -0800 Subject: [PATCH] fix minor bugs - remove anon option in channel dropdown when livestream tab is selected - attempt to fill publish form with current active channel name just prior to publishing to (edge condition) - edge condition occurs when user fills out form fully. User switches to Post (which allows anon in drop down selector). User selects Anon channel, then switches back to the livestream tab. The form was previously updated with `channel: undefined` but does not get changed when clicking the livestream tab. So we just updated the form one last time prior to publishing as a livestream - Show most recent livestream claim on livestream setup page instead of first livestream claim --- ui/component/publishForm/view.jsx | 10 +++++++++- ui/page/livestream/view.jsx | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ui/component/publishForm/view.jsx b/ui/component/publishForm/view.jsx index 4bcb69393..27f7649d9 100644 --- a/ui/component/publishForm/view.jsx +++ b/ui/component/publishForm/view.jsx @@ -314,6 +314,11 @@ function PublishForm(props: Props) { runPublish = true; } + // (Try to) Prevent an anon livestream claim + if (mode === PUBLISH_MODES.LIVESTREAM) { + updatePublishForm({ channel: activeChannelName }); + } + if (runPublish) { if (enablePublishPreview) { setPreviewing(true); @@ -339,7 +344,10 @@ function PublishForm(props: Props) { // Editing claim uri return (
- + { if (res && res.items && res.items.length > 0) { - const claim = res.items[0]; + const claim = res.items[res.items.length - 1]; setLivestreamClaim(claim); } else { setIsFetching(false);