Bug 1173789 - Showing Network activity spinner#658
Bug 1173789 - Showing Network activity spinner#658st3fan merged 1 commit intomozilla-mobile:masterfrom kar1m:karim/Bug1173789NetworkActivitySpinner
Conversation
There was a problem hiding this comment.
This is too simple.
For example, when the WKWebView fails to load and finishes via didFailNavigation:, the network spinner is never stopped.
Also, when a page loads and is put in the background because you open a new tab, the navigation delegate for the BrowserViewController is switched around so you will never receive a didFinish or didFail. So it may be better to do this in the TabManager which is a WKNavigationDelegate for all open tabs.
I think we should use an atomic counter to keep track of the state of all open tabs combined. So that multiple tabs can increment and decrement the spinner state counter and then networkActivityIndicatorVisible can be configured based on that.
Just keep in mind that there are many tabs loading at the same time.
|
@kar1m I don't have a good feeling about this because there is so much state that we need to track. I am wondering if we can do this in a different way. For example, the You could use |
…nner Bug 1173789 - Showing Network activity spinner
Fix an rubocop offense #trivial
* Fixes mozilla-mobile#629 - Updates Telemetry * move the foreground event to didBecomeActive
No description provided.