Closed Bug 1202528 Opened 6 years ago Closed 6 years ago
Every time visibiltiychange from hidden to show, a network activity icon is inserted
46 bytes, text/x-github-pull-request
|Details | Review|
STR: 1. Press power button on/off several times (my phone has SIM and WiFi enabled) 2. Use WebIDE for system app, in the inspector search #statusbar-network-activity, there'll be many. Root cause: In network_activity.js, when document is shown, _handle_visibilitychange() calls BaseIcon.start(), which will render() and insert the view.
This can be fixed by either a) add a customized render() like TimeIcon  to render only once, or b) only insert the view if the element is null in BaseIcon.render(). And I prefer b. How do you think?  http://lxr.mozilla.org/gaia/source/apps/system/js/time_icon.js#26
B is actually the way BaseUI (which BaseIcon inherits from) works https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/base_ui.js#L24. So yes, it should only inster elements once. Do you want me to take this one?
Flags: needinfo?(apastor) → needinfo?(janus926)
I'm fine for both taking or not taking, if you do not take, I'll fix it next week.
Attachment #8660731 - Flags: review?(etienne)
Comment on attachment 8660731 [details] [review] [gaia] albertopq:1202528-base-icon-once > mozilla-b2g:master Can we remove the special renderer in TimeIcon now? (fine if you want to do it in a follow up). Anyway, good catch :)
Attachment #8660731 - Flags: review?(etienne) → review+
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.