diff --git a/internal_packages/account-error-header/lib/account-error-header.jsx b/internal_packages/account-error-header/lib/account-error-header.jsx index f731a7b26..c6ec5d39f 100644 --- a/internal_packages/account-error-header/lib/account-error-header.jsx +++ b/internal_packages/account-error-header/lib/account-error-header.jsx @@ -55,7 +55,7 @@ export default class AccountErrorHeader extends React.Component { } render() { - const errorAccounts = this.state.accounts.filter(a => a.syncState !== "running"); + const errorAccounts = this.state.accounts.filter(a => a.hasSyncStateError()); if (errorAccounts.length === 1) { const account = errorAccounts[0]; diff --git a/internal_packages/preferences/lib/tabs/preferences-account-details.jsx b/internal_packages/preferences/lib/tabs/preferences-account-details.jsx index ea48bfbb6..157d0aaea 100644 --- a/internal_packages/preferences/lib/tabs/preferences-account-details.jsx +++ b/internal_packages/preferences/lib/tabs/preferences-account-details.jsx @@ -142,7 +142,7 @@ class PreferencesAccountDetails extends Component { } _renderSyncErrorDetails() { const {account} = this.state; - if (account.syncState !== Account.SYNC_STATE_RUNNING) { + if (account.hasSyncStateError()) { switch (account.syncState) { case Account.SYNC_STATE_AUTH_FAILED: return this._renderErrorDetail( diff --git a/internal_packages/preferences/lib/tabs/preferences-account-list.jsx b/internal_packages/preferences/lib/tabs/preferences-account-list.jsx index aea022902..84a4faec8 100644 --- a/internal_packages/preferences/lib/tabs/preferences-account-list.jsx +++ b/internal_packages/preferences/lib/tabs/preferences-account-list.jsx @@ -26,7 +26,7 @@ class PreferencesAccountList extends Component { _renderAccount = (account)=> { const label = account.label; const accountSub = `${account.name || 'No name provided'} <${account.emailAddress}>`; - const syncError = account.syncState !== Account.SYNC_STATE_RUNNING; + const syncError = account.hasSyncStateError(); return (
+ # TODO: ignoring "stopped" until it's no longer overloaded on API + return @syncState != Account.SYNC_STATE_RUNNING && + @syncState != Account.SYNC_STATE_STOPPED module.exports = Account