diff --git a/package.json b/package.json index 49c1f6def..4223ea551 100644 --- a/package.json +++ b/package.json @@ -137,7 +137,7 @@ "json-loader": "^0.5.4", "lbry-format": "https://github.com/lbryio/lbry-format.git", "lbry-redux": "lbryio/lbry-redux#e10295b5ec2ef42426755ed9fd50bd250b0d76dd", - "lbryinc": "lbryio/lbryinc#9440717a00d2fbb2e3226aaa2388f4698f324be2", + "lbryinc": "lbryio/lbryinc#48347494230c6d1610cfd1c0bef23924e7428288", "lint-staged": "^7.0.2", "localforage": "^1.7.1", "lodash-es": "^4.17.14", diff --git a/ui/component/app/index.js b/ui/component/app/index.js index 19850d29e..d3db0fe1e 100644 --- a/ui/component/app/index.js +++ b/ui/component/app/index.js @@ -6,7 +6,7 @@ import { selectUser, selectAccessToken, selectUserVerifiedEmail } from 'redux/se import { selectUnclaimedRewards } from 'redux/selectors/rewards'; import { doFetchChannelListMine, SETTINGS } from 'lbry-redux'; import { makeSelectClientSetting, selectLoadedLanguages, selectThemePath } from 'redux/selectors/settings'; -import { selectIsUpgradeAvailable, selectAutoUpdateDownloaded } from 'redux/selectors/app'; +import { selectIsUpgradeAvailable, selectAutoUpdateDownloaded, selectModal } from 'redux/selectors/app'; import { doGetWalletSyncPreference, doSetLanguage } from 'redux/actions/settings'; import { doSyncSubscribe } from 'redux/actions/syncwrapper'; import { @@ -30,6 +30,7 @@ const select = state => ({ uploadCount: selectUploadCount(state), rewards: selectUnclaimedRewards(state), isAuthenticated: selectUserVerifiedEmail(state), + currentModal: selectModal(state), }); const perform = dispatch => ({ diff --git a/ui/component/app/view.jsx b/ui/component/app/view.jsx index 91478c3d9..80e7d5e75 100644 --- a/ui/component/app/view.jsx +++ b/ui/component/app/view.jsx @@ -79,6 +79,7 @@ type Props = { socketConnect: () => void, syncSubscribe: () => void, syncEnabled: boolean, + currentModal: any, }; function App(props: Props) { @@ -103,6 +104,7 @@ function App(props: Props) { setReferrer, isAuthenticated, syncSubscribe, + currentModal, } = props; const appRef = useRef(); @@ -262,7 +264,7 @@ function App(props: Props) { }, [user, setReadyForPrefs]); useEffect(() => { - if (syncError && isAuthenticated && !pathname.includes(PAGES.AUTH_WALLET_PASSWORD)) { + if (syncError && isAuthenticated && !pathname.includes(PAGES.AUTH_WALLET_PASSWORD) && !currentModal) { history.push(`/$/${PAGES.AUTH_WALLET_PASSWORD}?redirect=${pathname}`); } // eslint-disable-next-line react-hooks/exhaustive-deps diff --git a/ui/component/syncToggle/view.jsx b/ui/component/syncToggle/view.jsx index 1f85c0278..2a885ecf3 100644 --- a/ui/component/syncToggle/view.jsx +++ b/ui/component/syncToggle/view.jsx @@ -1,5 +1,4 @@ // @flow -import * as PAGES from 'constants/pages'; import * as MODALS from 'constants/modal_types'; import React from 'react'; import Button from 'component/button'; @@ -18,20 +17,7 @@ type Props = { }; function SyncToggle(props: Props) { - const { - verifiedEmail, - getSyncError, - history, - location: { pathname }, - openModal, - syncEnabled, - disabled, - } = props; - - if (getSyncError) { - history.push(`/$/${PAGES.AUTH}?redirect=${pathname}&immediate=true`); - return null; - } + const { verifiedEmail, openModal, syncEnabled, disabled } = props; return (