refactor(core): adjust effect api (#11935)
This commit is contained in:
@@ -7,7 +7,7 @@ import {
|
||||
onStart,
|
||||
Service,
|
||||
} from '@toeverything/infra';
|
||||
import { EMPTY, mergeMap, switchMap } from 'rxjs';
|
||||
import { switchMap, tap } from 'rxjs';
|
||||
|
||||
import type { DesktopApiService } from '../../desktop-api';
|
||||
import type { WorkspacesService } from '../../workspace';
|
||||
@@ -37,9 +37,8 @@ export class BackupService extends Service {
|
||||
fromPromise(async () => {
|
||||
return this.desktopApiService.handler.workspace.getBackupWorkspaces();
|
||||
}).pipe(
|
||||
mergeMap(data => {
|
||||
tap(data => {
|
||||
this.pageBackupWorkspaces$.setValue(data);
|
||||
return EMPTY;
|
||||
}),
|
||||
catchErrorInto(this.error$),
|
||||
onStart(() => this.isLoading$.setValue(true)),
|
||||
|
||||
Reference in New Issue
Block a user