fix(initial-sync): Fix sync sidebar showing all the time

This commit is contained in:
Ben Gotow 2016-04-11 00:34:01 -07:00
parent 99bd3c1e69
commit b4b67c65c9

View file

@ -29,8 +29,12 @@ class InitialSyncActivity extends React.Component
incomplete = 0 incomplete = 0
for acctId, state of @state.sync for acctId, state of @state.sync
for model, modelState of state for modelName of NylasSyncStatusStore.ModelsForSync
incomplete += 1 unless modelState.complete modelState = state[modelName]
continue unless modelState
if not modelState.complete
incomplete += 1
if modelState.count if modelState.count
count += modelState.count / 1 count += modelState.count / 1
fetched += modelState.fetched / 1 fetched += modelState.fetched / 1