Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always listen for Network Connection for Offline Indictor #11672

Merged
merged 8 commits into from
Oct 17, 2022
15 changes: 0 additions & 15 deletions src/libs/NetworkConnection.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,21 +81,6 @@ function listenForReconnect() {
});
}

/**
* Tear down the event listeners when we are finished with them.
*/
function stopListeningForReconnect() {
Log.info('[NetworkConnection] stopListeningForReconnect called');
if (unsubscribeFromNetInfo) {
unsubscribeFromNetInfo();
unsubscribeFromNetInfo = undefined;
}
if (unsubscribeFromAppState) {
unsubscribeFromAppState();
unsubscribeFromAppState = undefined;
}
}

/**
* Register callback to fire when we reconnect
*
Expand Down
2 changes: 0 additions & 2 deletions src/libs/actions/Session/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import * as Localize from '../../Localize';
import UnreadIndicatorUpdater from '../../UnreadIndicatorUpdater';
import Timers from '../../Timers';
import * as Pusher from '../../Pusher/pusher';
import NetworkConnection from '../../NetworkConnection';
import * as User from '../User';
import * as Authentication from '../../Authentication';
import * as Welcome from '../Welcome';
Expand Down Expand Up @@ -373,7 +372,6 @@ function clearSignInData() {
*/
function cleanupSession() {
// We got signed out in this tab or another so clean up any subscriptions and timers
NetworkConnection.stopListeningForReconnect();
UnreadIndicatorUpdater.stopListeningForReportChanges();
PushNotification.deregister();
PushNotification.clearNotifications();
Expand Down