Skip to content
This repository has been archived by the owner on Aug 31, 2019. It is now read-only.

Fix Repetitive Toast When App Loses Internet While Backgrounded #361

Merged
merged 1 commit into from
Apr 9, 2017

Conversation

akaplo
Copy link

@akaplo akaplo commented Apr 7, 2017

Closes part of #348.

If the app is backgrounded and the device loses internet connection, the app will, when brought back to the foreground, show and then immediately hide the "no location" toast. It will do this as many times as the device went offline while it was backgrounded.

This PR removes the listeners for online and offline state changes when the app gets backgrounded, and re-adds them when the app is resumed.

@akaplo
Copy link
Author

akaplo commented Apr 9, 2017

Approved!

@akaplo akaplo merged commit 0c548af into ionic2/base Apr 9, 2017
@akaplo akaplo deleted the ionic2/location-toast-background branch April 9, 2017 01:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant