Closed
Bug 871772
Opened 11 years ago
Closed 11 years ago
B2G MMS: getMessages(filter, reverse) (DOMCursor) where thread has no messages
Categories
(Core :: DOM: Device Interfaces, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: rwaldron, Assigned: airpingu)
References
Details
When making a request to getMessages(filter, reverse) (where filter is { threadId: ... }) for a Thread that has no messages, there is no indication that the DOMCursor/Request is 'resolved' or 'done', nothing happens.
Reporter | ||
Updated•11 years ago
|
OS: Mac OS X → Gonk (Firefox OS)
Hardware: All → ARM
Assignee | ||
Comment 1•11 years ago
|
||
From the Gaia's point of view, would this one block any existing MMS functions? Or it's just a nice-to-have by far?
Comment 2•11 years ago
|
||
Gene, shouldn't you simply call nsIMobileMessageCallback::NotifyNoMessageInList() if you find no message?
Assignee | ||
Comment 3•11 years ago
|
||
(In reply to Mounir Lamouri (:mounir) from comment #2) > Gene, shouldn't you simply call > nsIMobileMessageCallback::NotifyNoMessageInList() if you find no message? Actually, the latest code is using DOM cursor now (please see /dom/mobilemessage/src/MobileMessageCursorCallback.cpp). Anyway, this bug is quite simple and I should be able to upload a quick patch for it.
Comment 4•11 years ago
|
||
There are also similar test cases in test_filter_mixed.js. Should also check why they're not functioning well.
Reporter | ||
Comment 5•11 years ago
|
||
I'm not sure I understand the cultural significance of this term I keep seeing used "nice to have"... this is a bug, not a feature request. The resulting behaviour is that a thread might be listed in the thread view, but clicking on it results in an empty message view.
Assignee | ||
Comment 6•11 years ago
|
||
(In reply to Rick Waldron from comment #5) > I'm not sure I understand the cultural significance of this term I keep > seeing used "nice to have"... this is a bug, not a feature request. The > resulting behaviour is that a thread might be listed in the thread view, but > clicking on it results in an empty message view. I was just wondering what's the scenario you'd attempt to input a thread ID that doesn't contain any messages? Don't you use .getThreads() to get all the threads that each of them must have some messages (i.e. the empty thread won't be returned in the result .getThreads())? Anyway, I'm debugging it. As you said, the function return is not expected when inputting an invalid thread ID. Need to fix it.
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → gene.lian
Assignee | ||
Comment 7•11 years ago
|
||
Hi Rick, I tried to hack the Gaia (b2g18, v1-train) codes by http://hastebin.com/guvigitiju.coffee, which is taking an invalid thread ID as the filter (since the thread ID is 99999999, no messages should belong to this thread). However, it can successfully go into the cursor.onsuccess as below, which is expected: I/GeckoDump( 430): gene test: getMessages I/GeckoDump( 430): gene test: 1 I/GeckoDump( 430): gene test: 5 I/GeckoDump( 430): gene test: 6 I cannot reproduce this bug. Could you please check it again? Thanks! Btw, Bug 872373 is under way, which can let you have a correct thread ID for the sent MMS. However, it probably needs to take one day to land onto the b2g18.
Flags: needinfo?(waldron.rick)
Reporter | ||
Comment 8•11 years ago
|
||
Gene, Thanks for looking at this. I actually cannot reproduce this on the latest build of b2g18, so I'm closing the issue.
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: needinfo?(waldron.rick)
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•