Skip to content
Permalink
Browse files

Remove useless early returns in show/hide methods

Summary: These aren't really doing much but making the API less deterministic. Fixes #91

Differential Revision: D17910217

fbshipit-source-id: 5b9623437e71f6e456bdc73200586b823a0d6679
  • Loading branch information...
xiphirx authored and facebook-github-bot committed Oct 14, 2019
1 parent 858159b commit f96f25a3c34b36c98ac46d0455801e2d01f03bc2
Showing with 1 addition and 7 deletions.
  1. +1 −7 shimmer/src/main/java/com/facebook/shimmer/ShimmerFrameLayout.java
@@ -108,21 +108,15 @@ public boolean isShimmerStarted() {
* @param startShimmer Whether to start the shimmer again.
*/
public void showShimmer(boolean startShimmer) {
if (mShowShimmer) {
return;
}
mShowShimmer = true;
if (startShimmer) {
startShimmer();
}
invalidate();
}

/** Sets the ShimmerDrawable to be invisible, stopping it in the process. */
public void hideShimmer() {
if (!mShowShimmer) {
return;
}

stopShimmer();
mShowShimmer = false;
invalidate();

0 comments on commit f96f25a

Please sign in to comment.
You can’t perform that action at this time.