|
@@ -6,6 +6,7 @@ import android.view.View;
|
|
|
|
|
|
import com.google.gson.Gson;
|
|
|
import com.google.gson.reflect.TypeToken;
|
|
|
+import com.vpn.fastestvpnservice.MainActivity;
|
|
|
import com.vpn.fastestvpnservice.R;
|
|
|
import de.blinkt.openvpn.core.App;
|
|
|
import com.vpn.fastestvpnservice.helpers.BasePreferenceHelper;
|
|
@@ -45,7 +46,6 @@ public class RetrofitNetworkHandling<T> implements Callback<T> {
|
|
|
//TODO mainactivity- check this loading finish for possible exceptions
|
|
|
|
|
|
if (!CheckInternetConnection.getInternetConnection(context).isConnectedToInternet()) {
|
|
|
- Log.d("chk_internet", "chk_internet_connectivity onResponse");
|
|
|
UIHelper.showToast(R.string.chk_internet_connectivity);
|
|
|
return;
|
|
|
}
|
|
@@ -126,7 +126,11 @@ public class RetrofitNetworkHandling<T> implements Callback<T> {
|
|
|
|
|
|
if (!CheckInternetConnection.getInternetConnection(context).isConnectedToInternet()) {
|
|
|
Log.d("chk_internet", "chk_internet_connectivity onFailure");
|
|
|
- UIHelper.showToast(R.string.chk_internet_connectivity);
|
|
|
+ if (MainActivity.Companion.isShowInternetToast()) {
|
|
|
+ Log.d("chk_internet", "chk_internet_connectivity onFailure In");
|
|
|
+ UIHelper.showToast(R.string.chk_internet_connectivity);
|
|
|
+ MainActivity.Companion.setShowInternetToast(false);
|
|
|
+ }
|
|
|
return;
|
|
|
}
|
|
|
|