refactor(core): adjust effect api (#11935)

This commit is contained in:
EYHN
2025-04-24 10:06:11 +00:00
parent 1d38e5787b
commit eaa1bc6bf1
41 changed files with 79 additions and 146 deletions

View File

@@ -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)),