Skip to content

Commit

Permalink
wrapper: use longer throttleTime instead of shorter debounceTime to t…
Browse files Browse the repository at this point in the history
…hrottle installedRepo observable (#315)
  • Loading branch information
sohkai committed May 29, 2019
1 parent 783ad0e commit 0caae25
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/aragon-wrapper/src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Externals
import { concat, ReplaySubject, Subject, BehaviorSubject, merge, of } from 'rxjs'
import { asyncScheduler, concat, merge, of, ReplaySubject, Subject, BehaviorSubject } from 'rxjs'
import {
concatMap,
debounceTime,
Expand All @@ -15,6 +15,7 @@ import {
startWith,
switchMap,
tap,
throttleTime,
withLatestFrom
} from 'rxjs/operators'
import uuidv4 from 'uuid/v4'
Expand Down Expand Up @@ -770,7 +771,8 @@ export default class Aragon {
return nextRepos
}
}, []),
debounceTime(100),
// Throttle updates, but must keep trailing to ensure we don't drop any updates
throttleTime(500, asyncScheduler, { leading: false, trailing: true }),
publishReplay(1)
)
this.installedRepos.connect()
Expand Down

0 comments on commit 0caae25

Please sign in to comment.