|
|
@ -7,7 +7,7 @@ |
|
|
|
|
|
|
|
|
import { Injectable } from '@angular/core'; |
|
|
import { Injectable } from '@angular/core'; |
|
|
import { combineLatest, Observable, throwError } from 'rxjs'; |
|
|
import { combineLatest, Observable, throwError } from 'rxjs'; |
|
|
import { catchError, share, tap } from 'rxjs/operators'; |
|
|
import { catchError, shareReplay, tap } from 'rxjs/operators'; |
|
|
|
|
|
|
|
|
import { |
|
|
import { |
|
|
DialogService, |
|
|
DialogService, |
|
|
@ -82,7 +82,7 @@ export class ContributorsState extends State<Snapshot> { |
|
|
this.project(x => !!x.canCreate); |
|
|
this.project(x => !!x.canCreate); |
|
|
|
|
|
|
|
|
public filtered = |
|
|
public filtered = |
|
|
combineLatest(this.queryRegex, this.contributors, (q, c) => getFilteredContributors(c, q)).pipe(share()); |
|
|
combineLatest(this.queryRegex, this.contributors, (q, c) => getFilteredContributors(c, q)).pipe(shareReplay()); |
|
|
|
|
|
|
|
|
public contributorsPaged = |
|
|
public contributorsPaged = |
|
|
combineLatest(this.page, this.filtered, (p, c) => getPagedContributors(c, p)); |
|
|
combineLatest(this.page, this.filtered, (p, c) => getPagedContributors(c, p)); |
|
|
@ -150,7 +150,7 @@ export class ContributorsState extends State<Snapshot> { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private replaceContributors(version: Version, payload: ContributorsPayload) { |
|
|
private replaceContributors(version: Version, payload: ContributorsPayload) { |
|
|
this.next(s => { |
|
|
this.next(() => { |
|
|
const { canCreate, items, maxContributors } = payload; |
|
|
const { canCreate, items, maxContributors } = payload; |
|
|
|
|
|
|
|
|
const contributors = ImmutableArray.of(items); |
|
|
const contributors = ImmutableArray.of(items); |
|
|
|