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

Commit

Permalink
Subscribe with each stream without enclosing with Observable.race
Browse files Browse the repository at this point in the history
  • Loading branch information
nju33 committed Oct 15, 2017
1 parent ef22faf commit 230e451
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/renderer/components/street.vue
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ export default {
*/
const reserveLoad = () => {
return setTimeout(() => {
// console.log('Try LOAD');
console.log('Try LOAD');
this.getItems$.next({
type: 'LOAD',
ctx: {resolve() {}},
Expand Down Expand Up @@ -346,11 +346,13 @@ export default {
return Rx.Observable.never();
})
const subscription = Rx.Observable.race(
interval$,
scroll$,
).subscribe();
this.subscriptions.push(subscription);
// const subscription = Rx.Observable.race(
// interval$,
// scroll$,
// ).subscribe();
// const
this.subscriptions.push(interval$.subscribe());
this.subscriptions.push(scroll$.subscribe());
})();
return {
Expand Down

0 comments on commit 230e451

Please sign in to comment.