diff --git a/src/flux/stores/thread-counts-store.coffee b/src/flux/stores/thread-counts-store.coffee index e311d5378..c0ee994a9 100644 --- a/src/flux/stores/thread-counts-store.coffee +++ b/src/flux/stores/thread-counts-store.coffee @@ -1,4 +1,3 @@ -Reflux = require 'reflux' _ = require 'underscore' NylasStore = require 'nylas-store' DatabaseStore = require('./database-store').default @@ -86,11 +85,11 @@ class ThreadCountsStore extends NylasStore _onCountsChanged: => DatabaseStore._query(ReadCountsQuery()).then (results) => - @_counts = {} + nextCounts = {} foundNegative = false for {category_id, unread, total} in results - @_counts[category_id] = {unread, total} + nextCounts[category_id] = {unread, total} if unread < 0 or total < 0 foundNegative = true @@ -99,6 +98,10 @@ class ThreadCountsStore extends NylasStore @reset() return + if _.isEqual(nextCounts, @_counts) + return + + @_counts = nextCounts @trigger() unreadCountForCategoryId: (catId) => diff --git a/src/pro b/src/pro index 498fa1e48..d8a1ebfb1 160000 --- a/src/pro +++ b/src/pro @@ -1 +1 @@ -Subproject commit 498fa1e48ec5bd925eb722307b93e93639500f0f +Subproject commit d8a1ebfb136ef181bc95ddcb4f455170ae1936d3