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() {
return dispatch => {
function handleSyncComplete() {
// we just got sync data, better update our channels
dispatch(doFetchChannelListMine());
dispatch(doGetAndPopulatePreferences());
function handleSyncComplete(error, hasNewData) {
if (!error) {
dispatch(doGetAndPopulatePreferences());
if (hasNewData) {
// we just got sync data, better update our channels
dispatch(doFetchChannelListMine());
}
}
}
return getSavedPassword().then(password => {