Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/115328
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(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/28/115328/1 diff --git a/wikipedia/src/main/java/org/wikipedia/Utils.java b/wikipedia/src/main/java/org/wikipedia/Utils.java index 88f74ff..58e0423 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: newchange Gerrit-Change-Id: I226568aa43fd5720af34ce285d6136b702b881c5 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER <br...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits