mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-08-23 17:47:24 +00:00
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() {
|
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 => {
|
||||||
|
|
Loading…
Add table
Reference in a new issue