cleanup sentDate keys in device storage

This commit is contained in:
Tankred Hase 2013-09-26 16:30:34 +02:00
parent 2b966c1132
commit 7fe8755b99
3 changed files with 9 additions and 4 deletions

View File

@ -7,8 +7,7 @@
define(function(require) { define(function(require) {
'use strict'; 'use strict';
var util = require('cryptoLib/util'), var jsonDao = require('js/dao/lawnchair-dao');
jsonDao = require('js/dao/lawnchair-dao');
var DeviceStorageDAO = function() { var DeviceStorageDAO = function() {
@ -24,7 +23,7 @@ define(function(require) {
* @param type [String] The type of item to be persisted e.g. 'email' * @param type [String] The type of item to be persisted e.g. 'email'
*/ */
DeviceStorageDAO.prototype.storeList = function(list, type, callback) { DeviceStorageDAO.prototype.storeList = function(list, type, callback) {
var date, key, items = []; var key, items = [];
// nothing to store // nothing to store
if (!list || list.length === 0) { if (!list || list.length === 0) {
@ -46,7 +45,6 @@ define(function(require) {
if (i.uid) { if (i.uid) {
key = type + '_' + i.uid; key = type + '_' + i.uid;
} else if (i.sentDate && i.id) { } else if (i.sentDate && i.id) {
date = util.parseDate(i.sentDate);
key = type + '_' + i.sentDate + '_' + i.id; key = type + '_' + i.sentDate + '_' + i.id;
} else if (i.id) { } else if (i.id) {
key = type + '_' + i.id; key = type + '_' + i.id;

6
src/lib/moment/moment.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -19,6 +19,7 @@
angular: 'angular/angular.min', angular: 'angular/angular.min',
angularRoute: 'angular/angular-route.min', angularRoute: 'angular/angular-route.min',
angularTouch: 'angular/angular-touch.min', angularTouch: 'angular/angular-touch.min',
moment: 'moment/moment.min',
uuid: 'uuid/uuid' uuid: 'uuid/uuid'
}, },
shim: { shim: {