mirror of
https://github.com/eugeny/tabby
synced 2026-05-29 20:51:16 +00:00
fix: use switchMap instead of flatMap for plugin search to prevent st… (#11089)
This commit is contained in:
committed by
GitHub
parent
0bd4a2a2b2
commit
ff81afb7fb
@@ -1,6 +1,6 @@
|
||||
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'
|
||||
import { BehaviorSubject, Observable, debounceTime, distinctUntilChanged, first, tap, flatMap, map } from 'rxjs'
|
||||
import { BehaviorSubject, Observable, debounceTime, distinctUntilChanged, first, tap, switchMap, map } from 'rxjs'
|
||||
import semverGt from 'semver/functions/gt'
|
||||
|
||||
import { Component, HostBinding, Input } from '@angular/core'
|
||||
@@ -48,7 +48,7 @@ export class PluginsSettingsTabComponent {
|
||||
.pipe(
|
||||
debounceTime(200),
|
||||
distinctUntilChanged(),
|
||||
flatMap(query => {
|
||||
switchMap(query => {
|
||||
this.availablePluginsReady = false
|
||||
return this.pluginManager.listAvailable(query).pipe(tap(() => {
|
||||
this.availablePluginsReady = true
|
||||
@@ -69,7 +69,7 @@ export class PluginsSettingsTabComponent {
|
||||
.pipe(
|
||||
debounceTime(200),
|
||||
distinctUntilChanged(),
|
||||
flatMap(query => {
|
||||
switchMap(query => {
|
||||
return this.pluginManager.listInstalled(query)
|
||||
}),
|
||||
).subscribe(plugin => {
|
||||
|
||||
Reference in New Issue
Block a user