Skip to content

Commit

Permalink
Trying to fix some more crashes...
Browse files Browse the repository at this point in the history
  • Loading branch information
IHFSchwarz committed Nov 29, 2017
1 parent 17a1312 commit 6e4915e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/de/hampager/dapnetmobile/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,8 @@ public void onFailure(Call<Versions> call, Throwable t) {
String s = "";
s += "App v";
s += BuildConfig.VERSION_NAME;
mNavHeadVersions.setText(s);

if(mNavHeadVersions!=null)
mNavHeadVersions.setText(s);
}

public void onNavHeaderSelected(View view) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ protected void onCreate(Bundle savedInstanceState) {
}

private void defineObjects() {
Log.i("TEST", "TEST");
message = (TextInputEditText) findViewById(R.id.post_call_text);
Switch emergency = (Switch) findViewById(R.id.post_call_emergencyswitch);
String m = user.toUpperCase();
Expand Down Expand Up @@ -143,7 +142,7 @@ public int compare(CallSignResource o1, CallSignResource o2) {
@Override
public void onFailure(Call<ArrayList<CallSignResource>> call, Throwable t) {
// something went completely wrong (e.g. no internet connection)
Log.e(TAG, t.getMessage());
Log.e(TAG, "Error... Do you have internet? "+ t.getMessage());
}
});
}
Expand Down Expand Up @@ -247,7 +246,7 @@ public int compare(TransmitterGroupResource o1, TransmitterGroupResource o2) {
@Override
public void onFailure(Call<ArrayList<TransmitterGroupResource>> call, Throwable t) {
// something went completely wrong (e.g. no internet connection)
Log.e(TAG, t.getMessage());
Log.e(TAG, "Error... Do you have internet? "+ t.getMessage());
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ public void onResponse(Call<StatsResource> call, Response<StatsResource> respons
public void onFailure(Call<StatsResource> call, Throwable t) {
// something went completely wrong (e.g. no internet connection)
Log.e(TAG, "Fatal connection error.. "+t.getMessage());
Snackbar.make(getActivity().findViewById(R.id.container), "Fatal connection error.. "+t.getMessage(), Snackbar.LENGTH_LONG).show();
if(getActivity()!=null&&getActivity().findViewById(R.id.container)!=null) {
Snackbar.make(getActivity().findViewById(R.id.container), "Fatal connection error.. " + t.getMessage(), Snackbar.LENGTH_LONG).show();
}
}
});
}
Expand Down

0 comments on commit 6e4915e

Please sign in to comment.