Skip to content
This repository has been archived by the owner on Oct 27, 2020. It is now read-only.

Wrong message display. #17

Open
MudasirBhutto opened this issue Feb 15, 2018 · 2 comments
Open

Wrong message display. #17

MudasirBhutto opened this issue Feb 15, 2018 · 2 comments

Comments

@MudasirBhutto
Copy link

Hi Guys,

Thanks a lot for this nice library. I was testing this library, and I faced this issue that when there is no internet connection, it is showing message that "You've turned on the airplane mode" and "Please turn off" even when airplane mode is turned off and internet connection is off.

Steps to reproduce this:

  1. Start application, and then turn on Airplane mode
  2. When Airplane dialog open, then turn off Airplane mode
  3. Go back to application, and then turn off WIFI while remaining on same activity
  4. Now when dialog appears, it'll show the same old i.e. "You've turned on the airplane mode" and "Please turn off"

I think you people are not refreshing the old message

@rakeshg147
Copy link

I came across the same issue when testing the library. Please provide a fix for this.

@rakeshg147
Copy link

rakeshg147 commented Jul 20, 2018

At the start of the method startFlight() in NoInternetDialog.java, it should be

private void startFlight() {
if (!NoInternetUtils.isAirplaneModeOn(getContext())) {
plane.setVisibility(View.GONE);
noInternetBody.setText(R.string.no_internet_body);
return;
}

instead of

private void startFlight() {
if (!NoInternetUtils.isAirplaneModeOn(getContext())) {
plane.setVisibility(View.GONE);
return;
}

Please look into this.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants