Move reconnection logic from the app to the view.