Skip to content

Commit

Permalink
fix: search should include most recent results if results are truncat…
Browse files Browse the repository at this point in the history
…ed (#37)
  • Loading branch information
hallettj authored Aug 1, 2019
1 parent 339e2e1 commit b6706f1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/main/src/sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,10 @@ class BoxSync {
)
.toPromise()
)
// Returned uids appear to be in ascending order, which should mean that
// the most recent search results are at the end of the list.
.slice(0 - MAX_SEARCH_RESULTS)
.map(uid => parseInt(uid, 10))
.take(MAX_SEARCH_RESULTS)

// Add messages that have already been downloaded to result set
cache.addSearchResults({
Expand Down

0 comments on commit b6706f1

Please sign in to comment.