Miko fixes 0.52.2 a2 #7451

Merged
jessopb merged 3 commits from miko-fixes-0.52.2-a2 into master 2022-01-30 00:25:40 +01:00
Showing only changes of commit 1f6e57d911 - Show all commits

View file

@ -273,12 +273,18 @@ function CollectionForm(props: Props) {
// on mount, if we get a collectionChannel, set it. // on mount, if we get a collectionChannel, set it.
React.useEffect(() => { React.useEffect(() => {
if (hasClaim && !initialized) { if (!initialized) {
if (collectionChannel) { if (hasClaim) {
setActiveChannel(collectionChannel); if (collectionChannel) {
setIncognito(false); setActiveChannel(collectionChannel);
} else if (!collectionChannel && hasClaim) { setIncognito(false);
setIncognito(true); } else if (!collectionChannel && hasClaim) {
setIncognito(true);
}
} else {
if (incognito) {
setIncognito(true);
}
} }
setInitialized(true); setInitialized(true);
} }
@ -287,9 +293,10 @@ function CollectionForm(props: Props) {
// every time activechannel or incognito changes, set it. // every time activechannel or incognito changes, set it.
React.useEffect(() => { React.useEffect(() => {
if (initialized) { if (initialized) {
if (activeChannelId) { if (activeChannelId && !incognito) {
setParam({ channel_id: activeChannelId }); setParam({ channel_id: activeChannelId });
} else if (incognito) { }
if (incognito) {
setParam({ channel_id: undefined }); setParam({ channel_id: undefined });
} }
} }