only fetch channel_list when sync returns new data
This commit is contained in:
parent
db438bc979
commit
eb54d899fb
1 changed files with 9 additions and 4 deletions
|
@ -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 => {
|
||||
|
|
Loading…
Add table
Reference in a new issue