mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 12:25:53 +00:00
Bug 963475 - Reverse the order of retrieval of message threads. r=gene
This commit is contained in:
parent
bc0d73a278
commit
156bdefe5c
@ -2605,7 +2605,7 @@ MobileMessageDB.prototype = {
|
||||
if (DEBUG) debug("Caught error on transaction ", event.target.errorCode);
|
||||
collector.collect(null, COLLECT_ID_ERROR, COLLECT_TIMESTAMP_UNUSED);
|
||||
};
|
||||
let request = threadStore.index("lastTimestamp").openKeyCursor();
|
||||
let request = threadStore.index("lastTimestamp").openKeyCursor(null, PREV);
|
||||
request.onsuccess = function(event) {
|
||||
let cursor = event.target.result;
|
||||
if (cursor) {
|
||||
|
@ -376,6 +376,9 @@ checkFuncs.push(checkThread.bind(null, ["thread 18-1", "thread 18-2"],
|
||||
tasks.push(getAllThreads.bind(null, function(threads) {
|
||||
is(threads.length, checkFuncs.length, "number of threads got");
|
||||
|
||||
// Reverse threads as we iterate over them in reverse order
|
||||
threads.reverse();
|
||||
|
||||
(function callback() {
|
||||
if (!threads.length) {
|
||||
tasks.next();
|
||||
|
Loading…
Reference in New Issue
Block a user