jenkins-bot has submitted this change and it was merged.
Change subject: Prevent WebView loading spinner from persisting inappropriately
......................................................................
Prevent WebView loading spinner from persisting inappropriately
In certain cases (namely, for very short pages), the call to
bridge.sendMessage at the end of the displayLeadSection listener callback
could trigger the execution of a pending JavaScript callback related to
the remaining sections, with the practical effect that the loading spinner
would be removed before being added. This changes the order of execution
so that doesn't happen.
Bug: T123940
Change-Id: I404d2d1580021de45e3590bf0d15a44ee5811acc
---
M app/src/main/assets/bundle.js
M www/js/sections.js
2 files changed, 4 insertions(+), 2 deletions(-)
Approvals:
Dbrant: Looks good to me, approved
jenkins-bot: Verified
diff --git a/app/src/main/assets/bundle.js b/app/src/main/assets/bundle.js
index bc6fd89..357e66e 100644
--- a/app/src/main/assets/bundle.js
+++ b/app/src/main/assets/bundle.js
@@ -491,6 +491,8 @@
transformer.transform("displayDisambigLink", content);
transformer.transform("displayIssuesLink", content);
+ document.getElementById( "loading_sections").className = "loading";
+
bridge.sendMessage( "pageInfo", {
"issues" : collectIssues(),
"disambiguations" : collectDisambig()
@@ -500,7 +502,6 @@
document.getElementById( "content" ).removeChild(issuesContainer);
}
- document.getElementById( "loading_sections").className = "loading";
scrolledOnLoad = false;
});
diff --git a/www/js/sections.js b/www/js/sections.js
index 7814b24..3214df7 100644
--- a/www/js/sections.js
+++ b/www/js/sections.js
@@ -119,6 +119,8 @@
transformer.transform("displayDisambigLink", content);
transformer.transform("displayIssuesLink", content);
+ document.getElementById( "loading_sections").className = "loading";
+
bridge.sendMessage( "pageInfo", {
"issues" : collectIssues(),
"disambiguations" : collectDisambig()
@@ -128,7 +130,6 @@
document.getElementById( "content" ).removeChild(issuesContainer);
}
- document.getElementById( "loading_sections").className = "loading";
scrolledOnLoad = false;
});
--
To view, visit https://gerrit.wikimedia.org/r/277549
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I404d2d1580021de45e3590bf0d15a44ee5811acc
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mholloway <[email protected]>
Gerrit-Reviewer: BearND <[email protected]>
Gerrit-Reviewer: Brion VIBBER <[email protected]>
Gerrit-Reviewer: Dbrant <[email protected]>
Gerrit-Reviewer: Niedzielski <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits