From 010c323769faf9703a84144576ba33eb4410562e Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Thu, 19 Sep 2019 22:30:33 +0800 Subject: Disable showing precise error messages. --- .../ml/docilealligator/infinityforreddit/PostFragment.java | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'app/src/main/java/ml') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/PostFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/PostFragment.java index 23cb85bc..67a0b247 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/PostFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/PostFragment.java @@ -411,8 +411,7 @@ public class PostFragment extends Fragment implements FragmentCommunicator { } else if(networkState.getStatus().equals(NetworkState.Status.FAILED)) { mProgressBar.setVisibility(View.GONE); mFetchPostInfoLinearLayout.setOnClickListener(view -> refresh()); - //showErrorView(R.string.load_posts_error); - showErrorView(networkState.getMsg()); + showErrorView(R.string.load_posts_error); } else { mProgressBar.setVisibility(View.VISIBLE); } @@ -467,15 +466,6 @@ public class PostFragment extends Fragment implements FragmentCommunicator { } } - private void showErrorView(String message) { - if(activity != null && isAdded()) { - mProgressBar.setVisibility(View.GONE); - mFetchPostInfoLinearLayout.setVisibility(View.VISIBLE); - mFetchPostInfoTextView.setText(message); - mGlide.load(R.drawable.error_image).into(mFetchPostInfoImageView); - } - } - @Override public void changeNSFW(boolean nsfw) { mPostViewModel.changeNSFW(nsfw); -- cgit v1.2.3