Yuvipanda has submitted this change and it was merged. Change subject: Fix "page goes blank after saving" bug ......................................................................
Fix "page goes blank after saving" bug This was breaking if your internet was fast. ;) Fade-out of the web view to the progress indicator was getting canceled by the subsequent fade-in, but the listener's onAnimationEnd handler was still being called and hiding the webView completely. Added a check for cancelation, which seems to resolve it. Bug: 60696 Change-Id: I226568aa43fd5720af34ce285d6136b702b881c5 --- M wikipedia/src/main/java/org/wikipedia/Utils.java 1 file changed, 13 insertions(+), 2 deletions(-) Approvals: Yuvipanda: Verified; Looks good to me, approved diff --git a/wikipedia/src/main/java/org/wikipedia/Utils.java b/wikipedia/src/main/java/org/wikipedia/Utils.java index a669489..b394b5c 100644 --- a/wikipedia/src/main/java/org/wikipedia/Utils.java +++ b/wikipedia/src/main/java/org/wikipedia/Utils.java @@ -70,10 +70,21 @@ .alpha(0f) .setDuration(WikipediaApp.MEDIUM_ANIMATION_DURATION) .setListener(new AnimatorListenerAdapter() { + boolean wasCanceled = false; + + @Override + public void onAnimationCancel(Animator animation) { + wasCanceled = true; + } + @Override public void onAnimationEnd(Animator animation) { - view.setVisibility(View.GONE); - view.setAlpha(1.0f); + if (!wasCanceled) { + // Detect if we got canceled, and if so DON'T hide... + // There's another animation now pushing the alpha back up + view.setVisibility(View.GONE); + view.setAlpha(1.0f); + } } }); } -- To view, visit https://gerrit.wikimedia.org/r/115328 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I226568aa43fd5720af34ce285d6136b702b881c5 Gerrit-PatchSet: 2 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER <br...@wikimedia.org> Gerrit-Reviewer: Yuvipanda <yuvipa...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits