fix(offline-notif) Try to connect immediately upon window focus

Summary: see title

Test Plan: manual

Reviewers: mark

Reviewed By: mark

Differential Revision: https://phab.nylas.com/D3901
This commit is contained in:
Juan Tejada 2017-02-13 12:23:22 -08:00
parent 06fe77bb21
commit 8d875a6307

View file

@ -101,6 +101,7 @@ export default class OfflineNotification extends React.Component {
// only attempt to retry if the window is in the foreground to avoid
// the battery hit.
if (!this.state.connected && !document.body.classList.contains('is-blurred')) {
Actions.retryDeltaConnection();
this._updateInterval = setInterval(() => {
Actions.retryDeltaConnection();
}, CHECK_STATUS_INTERVAL);