Skip to content
This repository has been archived by the owner on Sep 22, 2021. It is now read-only.

Commit

Permalink
Patch for no messages returned
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas101 committed Oct 26, 2016
1 parent 1d20de0 commit f800d4d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/scenes/mailboxes/src/stores/google/googleHTTP.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,11 @@ class GoogleHTTP {
reject({ err: err })
} else {
// Do a pre-count for unread messages and threads
response.messages = response.messages || []
resolve({
response: response,
unreadMessageCount: (response.messages || []).length,
unreadThreadCount: (response.messages || []).reduce((acc, message) => {
unreadMessageCount: response.messages.length,
unreadThreadCount: response.messages.reduce((acc, message) => {
return acc.add(message.threadId)
}, new Set()).size
})
Expand Down

0 comments on commit f800d4d

Please sign in to comment.