From 4097b0e9fd508a52818cc8d2ac1bff17f0566c09 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Wed, 16 Oct 2019 01:41:49 -0400 Subject: [PATCH] fetch channels after syncing --- src/ui/component/syncToggle/view.jsx | 3 ++- src/ui/redux/actions/app.js | 6 ++++-- src/ui/util/saved-passwords.js | 2 +- static/app-strings.json | 10 ++++++++-- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/ui/component/syncToggle/view.jsx b/src/ui/component/syncToggle/view.jsx index 27d1c080b..0a2351e13 100644 --- a/src/ui/component/syncToggle/view.jsx +++ b/src/ui/component/syncToggle/view.jsx @@ -29,7 +29,8 @@ function SyncToggle(props: Props) { } if (getSyncError) { - return history.push(`/$/${PAGES.AUTH}?redirect=${pathname}&immediate=true`); + history.push(`/$/${PAGES.AUTH}?redirect=${pathname}&immediate=true`); + return null; } return ( diff --git a/src/ui/redux/actions/app.js b/src/ui/redux/actions/app.js index 63f66a90f..f8b317c08 100644 --- a/src/ui/redux/actions/app.js +++ b/src/ui/redux/actions/app.js @@ -467,7 +467,9 @@ export function doSignOut() { export function doSyncWithPreferences() { return dispatch => { - function handlePreferencesAfterSync() { + function handleSyncComplete() { + dispatch(doFetchChannelListMine()); + function successCb(savedPreferences) { dispatch(doPopulateSharedUserState(savedPreferences)); } @@ -487,7 +489,7 @@ export function doSyncWithPreferences() { return getSavedPassword().then(password => { const passwordArgument = password === null ? '' : password; - dispatch(doGetSync(passwordArgument, handlePreferencesAfterSync)); + dispatch(doGetSync(passwordArgument, handleSyncComplete)); }); }; } diff --git a/src/ui/util/saved-passwords.js b/src/ui/util/saved-passwords.js index a6853a605..0ae75708b 100644 --- a/src/ui/util/saved-passwords.js +++ b/src/ui/util/saved-passwords.js @@ -9,7 +9,7 @@ export const setSavedPassword = (value, saveToDisk) => { }); sessionPassword = value; - if (saveToDisk && value) { + if (saveToDisk && value !== undefined) { ipcRenderer.send('set-password', value); } }); diff --git a/static/app-strings.json b/static/app-strings.json index e3f1a5549..3bdf9769d 100644 --- a/static/app-strings.json +++ b/static/app-strings.json @@ -818,5 +818,11 @@ "Anonymous content is published without a channel.": "Anonymous content is published without a channel.", "settings": "settings", "Content may be hidden on this %type% because of your %settings%": "Content may be hidden on this %type% because of your %settings%", - "Content may be hidden on this %type% because of your %settings%.": "Content may be hidden on this %type% because of your %settings%." -} + "Content may be hidden on this %type% because of your %settings%.": "Content may be hidden on this %type% because of your %settings%.", + "Sync balance and preferences across devices.": "Sync balance and preferences across devices.", + "By continuing, I agree to the %terms% and confirm I am over the age of 13.": "By continuing, I agree to the %terms% and confirm I am over the age of 13.", + "Sync": "Sync", + "Sync your balance and preferences accross LBRY apps.": "Sync your balance and preferences accross LBRY apps.", + "earned and bound in tips": "earned and bound in tips", + "currently staked": "currently staked" +} \ No newline at end of file