Skip to content

Commit

Permalink
remove loadspinner from webclient
Browse files Browse the repository at this point in the history
  • Loading branch information
mattvb91 committed Jan 31, 2017
1 parent f5fd3c9 commit ee6e7de
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions app/src/main/java/mavonie/subterminal/Utils/WebClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,11 @@ public class WebClient extends WebViewClient {
public boolean shouldOverrideUrlLoading(WebView view, String url) {
if (Uri.parse(url).toString().contains("?payment=true")) {

UIHelper.loadSpinner();

//Make sure user is authenticated before we allow further
Call updateUser = Subterminal.getApi().getEndpoints().getUser();
updateUser.enqueue(new Callback<User>() {
@Override
public void onResponse(Call call, Response response) {
UIHelper.removeLoadSpinner();

if (response.isSuccessful()) {
Intent scanIntent = new Intent(MainActivity.getActivity(), CardIOActivity.class);

Expand All @@ -45,7 +41,6 @@ public void onResponse(Call call, Response response) {
@Override
public void onFailure(Call call, Throwable t) {
UIHelper.toast("There was an issue contacting the server");
UIHelper.removeLoadSpinner();
}
});
}
Expand Down

0 comments on commit ee6e7de

Please sign in to comment.