Disable showing precise error messages.

This commit is contained in:
Alex Ning 2019-09-19 22:30:33 +08:00
parent cf84a6d431
commit 010c323769

View File

@ -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);