Fix initial post-sync timestamps

Fixes #669

// FREEBIE
This commit is contained in:
lilia 2016-02-24 12:03:25 -08:00
parent d121effe3b
commit e91f646920
2 changed files with 4 additions and 5 deletions

View file

@ -29,11 +29,7 @@
database: Whisper.Database,
storeName: 'conversations',
defaults: function() {
var timestamp = new Date().getTime();
return {
unreadCount : 0,
timestamp : timestamp,
};
return { unreadCount : 0 };
},
initialize: function() {

View file

@ -13,6 +13,9 @@
this.clearTimeout();
var millis_now = Date.now();
var millis = this.$el.data('timestamp');
if (millis === "") {
return;
}
if (millis >= millis_now) {
millis = millis_now;
}