Skip to content
This repository has been archived by the owner on Jul 8, 2024. It is now read-only.

Commit

Permalink
Changed message on api server connection error
Browse files Browse the repository at this point in the history
  • Loading branch information
rvyk committed Jun 5, 2023
1 parent 457db54 commit 501fc34
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
2 changes: 1 addition & 1 deletion app/src/main/java/pl/rvyk/instapp/LoginActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public void onErrorResponse(VolleyError error) {
if (error.networkResponse != null && error.networkResponse.statusCode == 403) {
SnackbarController.showSnackbar(LoginActivity.this, mainLinearContent, null, getResources().getString(R.string.invalid_credentials), false);
} else {
SnackbarController.showSnackbar(LoginActivity.this, mainLinearContent, error, getResources().getString(R.string.network_error), true);
SnackbarController.showSnackbar(LoginActivity.this, mainLinearContent, error, getResources().getString(R.string.api_host_error), true);
}
progressBar.setVisibility(View.GONE);
linearLayout.setVisibility(View.VISIBLE);
Expand Down
11 changes: 0 additions & 11 deletions app/src/main/java/pl/rvyk/instapp/utils/WebhookController.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package pl.rvyk.instapp.utils;

import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;
import android.content.pm.PackageManager;
import android.os.Build;
Expand All @@ -14,22 +12,13 @@
import com.android.volley.VolleyError;
import com.android.volley.toolbox.StringRequest;
import com.android.volley.toolbox.Volley;
import com.google.firebase.FirebaseApp;
import com.google.firebase.FirebaseOptions;
import com.google.firebase.firestore.FirebaseFirestoreSettings;
import com.google.firebase.remoteconfig.FirebaseRemoteConfig;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.io.PrintWriter;
import java.io.StringWriter;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;

import pl.rvyk.instapp.R;
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<string name="network_error">Brak połączenia z internetem</string>
<string name="invalid_credentials">Niepoprawne dane logowania</string>
<string name="unkown_error">Wystąpił nieokreślony błąd</string>
<string name="api_host_error">Serwer API jest chwilowo niedostępny</string>

<!-- Start Fragment-->
<string name="start_title">Rozpocznij</string>
Expand Down

0 comments on commit 501fc34

Please sign in to comment.