Closed
Bug 857964
Opened 12 years ago
Closed 12 years ago
[SMS][MMS] Timing issue in ThreadListUI.renderThreads can end up in double entries in thread list
Categories
(Firefox OS Graveyard :: Gaia::SMS, defect)
Tracking
(blocking-b2g:-, b2g18+)
RESOLVED
DUPLICATE
of bug 869799
blocking-b2g | - |
Tracking | Status | |
---|---|---|
b2g18 | + | --- |
People
(Reporter: janjongboom, Unassigned)
Details
Attachments
(1 file)
46 bytes,
patch
|
Details | Diff | Splinter Review |
ThreadListUI.renderThreads renders every item in the thread list that it receives on the next tick via a setTimeout. This probably has some historic reasons, but the side-effect is that when the method is called twice in a certain timeframe (length of a tick * list length) double entries end up in the thread list. You can see this behavior f.e. when immediately ponging back a message when sending one.
We need to stop the old render action when a new one comes in.
Reporter | ||
Comment 1•12 years ago
|
||
Adds an internal ID that keeps track of the render actions that are running and thus has the ability to stop old render actions. This way there won't be any double entries in the thread list.
Attachment #733233 -
Flags: review?(francisco.jordano)
Updated•12 years ago
|
Attachment #733233 -
Flags: review?(francisco.jordano) → review?(fbsc)
Comment 2•12 years ago
|
||
Could you specify some steps to reproduce? Because the tests are working. Thanks!
Reporter | ||
Comment 3•12 years ago
|
||
Hi Borja, execute the following code in the console when running the app in FF Nightly:
MessageManager.getThreads(ThreadListUI.renderThreads);MessageManager.getThreads(ThreadListUI.renderThreads);
All threads are in the list now twice.
Comment 4•12 years ago
|
||
Where(In reply to janjongboom from comment #3)
> Hi Borja, execute the following code in the console when running the app in
> FF Nightly:
>
> MessageManager.getThreads(ThreadListUI.renderThreads);MessageManager.
> getThreads(ThreadListUI.renderThreads);
Where does this happen in the existing code?
>
> All threads are in the list now twice.
Reporter | ||
Comment 5•12 years ago
|
||
Rick, this was just to show the effect. This can happen if two events come in right after eachother (gets worse on a big list of SMSes).
Updated•12 years ago
|
Summary: Timing issue in ThreadListUI.renderThreads can end up in double entries in thread list → [SMS][MMS] Timing issue in ThreadListUI.renderThreads can end up in double entries in thread list
Reporter | ||
Comment 6•12 years ago
|
||
Updated the PR to add tests.
Reporter | ||
Comment 7•12 years ago
|
||
Hey, this PR has been open for quite a while now, can either of you review this?
blocking-b2g: --- → tef?
Reporter | ||
Comment 8•12 years ago
|
||
Nominating as tef? as I have managed to get this effect on my phone today (1.0.1) and it looks really really weird.
Comment 9•12 years ago
|
||
(In reply to janjongboom from comment #8)
> Nominating as tef? as I have managed to get this effect on my phone today
> (1.0.1) and it looks really really weird.
No data loss, and this isn't a common issue. Please nominate the patch for approval to v1.1 once resolved.
blocking-b2g: tef? → -
tracking-b2g18:
--- → +
Comment 10•12 years ago
|
||
Comment on attachment 733233 [details] [diff] [review]
Patch
I would change to a boolean var instead. Please address the comment and ask to review again when ready. Thanks!
Attachment #733233 -
Flags: review?(fbsc)
Reporter | ||
Comment 11•12 years ago
|
||
Comment on attachment 733233 [details] [diff] [review]
Patch
Borja, please see my comment on GH
Attachment #733233 -
Flags: review?(fbsc)
Comment 12•12 years ago
|
||
I might of duped this @ bug 869799
Updated•12 years ago
|
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
Reporter | ||
Updated•12 years ago
|
Attachment #733233 -
Flags: review?(fbsc)
You need to log in
before you can comment on or make changes to this bug.
Description
•