Browse Source

Update ProfileFragment.java

renovate/org.robolectric-robolectric-4.x
Austin Huang 4 years ago
committed by GitHub
parent
commit
aaf87a0ded
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      app/src/main/java/awais/instagrabber/fragments/main/ProfileFragment.java

7
app/src/main/java/awais/instagrabber/fragments/main/ProfileFragment.java

@ -543,16 +543,9 @@ public class ProfileFragment extends Fragment implements SwipeRefreshLayout.OnRe
binding.mainFollowing.setOnClickListener(followingCount > 0 ? followClickListener : null); binding.mainFollowing.setOnClickListener(followingCount > 0 ? followClickListener : null);
} }
if (profileModel.getPostCount() == 0) {
binding.swipeRefreshLayout.setRefreshing(false);
binding.privatePage1.setImageResource(R.drawable.ic_cancel);
binding.privatePage2.setText(R.string.empty_acc);
binding.privatePage.setVisibility(View.VISIBLE);
} else {
binding.swipeRefreshLayout.setRefreshing(true); binding.swipeRefreshLayout.setRefreshing(true);
binding.mainPosts.setVisibility(View.VISIBLE); binding.mainPosts.setVisibility(View.VISIBLE);
fetchPosts(); fetchPosts();
}
} else { } else {
binding.mainFollowers.setClickable(false); binding.mainFollowers.setClickable(false);
binding.mainFollowing.setClickable(false); binding.mainFollowing.setClickable(false);

Loading…
Cancel
Save