From e91f6469209da899755c2103c90f791d8fdcce60 Mon Sep 17 00:00:00 2001 From: lilia Date: Wed, 24 Feb 2016 12:03:25 -0800 Subject: [PATCH] Fix initial post-sync timestamps Fixes #669 // FREEBIE --- js/models/conversations.js | 6 +----- js/views/timestamp_view.js | 3 +++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/js/models/conversations.js b/js/models/conversations.js index 6ee6d668..9485601f 100644 --- a/js/models/conversations.js +++ b/js/models/conversations.js @@ -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() { diff --git a/js/views/timestamp_view.js b/js/views/timestamp_view.js index fedff7d4..953347b4 100644 --- a/js/views/timestamp_view.js +++ b/js/views/timestamp_view.js @@ -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; }