only fetch channel_list when sync returns new data

This commit is contained in:
Sean Yesmunt 2020-03-24 17:19:39 -04:00
parent db438bc979
commit eb54d899fb

View file

@ -554,10 +554,15 @@ export function doGetAndPopulatePreferences() {
export function doSyncWithPreferences() { export function doSyncWithPreferences() {
return dispatch => { return dispatch => {
function handleSyncComplete() { function handleSyncComplete(error, hasNewData) {
if (!error) {
dispatch(doGetAndPopulatePreferences());
if (hasNewData) {
// we just got sync data, better update our channels // we just got sync data, better update our channels
dispatch(doFetchChannelListMine()); dispatch(doFetchChannelListMine());
dispatch(doGetAndPopulatePreferences()); }
}
} }
return getSavedPassword().then(password => { return getSavedPassword().then(password => {