From b4b67c65c9685f1d77f3fe53bbe112f9b816f1f2 Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Mon, 11 Apr 2016 00:34:01 -0700 Subject: [PATCH] fix(initial-sync): Fix sync sidebar showing all the time --- .../notifications/lib/sidebar/initial-sync-activity.cjsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/internal_packages/notifications/lib/sidebar/initial-sync-activity.cjsx b/internal_packages/notifications/lib/sidebar/initial-sync-activity.cjsx index e7187e43d..3c81f49c2 100644 --- a/internal_packages/notifications/lib/sidebar/initial-sync-activity.cjsx +++ b/internal_packages/notifications/lib/sidebar/initial-sync-activity.cjsx @@ -29,8 +29,12 @@ class InitialSyncActivity extends React.Component incomplete = 0 for acctId, state of @state.sync - for model, modelState of state - incomplete += 1 unless modelState.complete + for modelName of NylasSyncStatusStore.ModelsForSync + modelState = state[modelName] + continue unless modelState + + if not modelState.complete + incomplete += 1 if modelState.count count += modelState.count / 1 fetched += modelState.fetched / 1