mirror of
https://github.com/moparisthebest/mail
synced 2024-11-29 04:12:18 -05:00
cleanup
This commit is contained in:
parent
5b98cd692a
commit
7758b144dc
@ -45,7 +45,7 @@ app.dao.LawnchairDAO = function(window) {
|
|||||||
* @param num [Number] The number of items to fetch (null means fetch all)
|
* @param num [Number] The number of items to fetch (null means fetch all)
|
||||||
*/
|
*/
|
||||||
this.list = function(type, offset, num, callback) {
|
this.list = function(type, offset, num, callback) {
|
||||||
var i, list = [], matchingKeys =[];
|
var i, list = [], matchingKeys =[], parts, date;
|
||||||
|
|
||||||
Lawnchair(function() {
|
Lawnchair(function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
@ -75,8 +75,8 @@ app.dao.LawnchairDAO = function(window) {
|
|||||||
// sort items by date
|
// sort items by date
|
||||||
if (list[0].sentDate) {
|
if (list[0].sentDate) {
|
||||||
list = _.sortBy(list, function(item) {
|
list = _.sortBy(list, function(item) {
|
||||||
var parts = item.sentDate.match(/(\d+)/g);
|
parts = item.sentDate.match(/(\d+)/g);
|
||||||
var date = new Date(parts[0], parts[1] - 1, parts[2], parts[3], parts[4], parts[5]);
|
date = new Date(parts[0], parts[1] - 1, parts[2], parts[3], parts[4], parts[5]);
|
||||||
return date.getTime();
|
return date.getTime();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user