Closed
Bug 1202528
Opened 9 years ago
Closed 9 years ago
Every time visibiltiychange from hidden to show, a network activity icon is inserted
Categories
(Firefox OS Graveyard :: Gaia::System::Status bar, Utility tray, Notification, defect)
Firefox OS Graveyard
Gaia::System::Status bar, Utility tray, Notification
ARM
Gonk (Firefox OS)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: ting, Assigned: apastor)
References
Details
(Whiteboard: [systemsfe])
Attachments
(1 file)
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.
Reporter | ||
Comment 1•9 years ago
|
||
This can be fixed by either a) add a customized render() like TimeIcon [1] 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? [1] http://lxr.mozilla.org/gaia/source/apps/system/js/time_icon.js#26
Flags: needinfo?(apastor)
Assignee | ||
Comment 2•9 years ago
|
||
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)
Reporter | ||
Comment 3•9 years ago
|
||
I'm fine for both taking or not taking, if you do not take, I'll fix it next week.
Flags: needinfo?(janus926)
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → apastor
Assignee | ||
Updated•9 years ago
|
Whiteboard: [systemsfe]
Comment 4•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Attachment #8660731 -
Flags: review?(etienne)
Comment 5•9 years ago
|
||
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+
Assignee | ||
Comment 6•9 years ago
|
||
master: https://github.com/mozilla-b2g/gaia/commit/d130529c626695570c7b5017d9b43955115d68a0
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•