Skip to content

Commit

Permalink
fix(list-view): isLoading set false whatever error is arised
Browse files Browse the repository at this point in the history
  • Loading branch information
ElonH committed May 21, 2020
1 parent 93031d9 commit 1d178c7
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/app/pages/manager/fileMode/listView/listView.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Component, OnInit, OnDestroy } from '@angular/core';
import { Columns, Config, DefaultConfig } from 'ngx-easy-table';
import { OperationsListFlowOutItemNode } from 'src/app/@dataflow/rclone';
import { OperationsListService } from '../operations-list.service';
import { filter } from 'rxjs/operators';
import { Subscription } from 'rxjs';

@Component({
Expand All @@ -20,12 +19,11 @@ export class ListViewComponent implements OnInit, OnDestroy {

constructor(private listService: OperationsListService) {}

visable = false;
ngOnInit() {
this.visable = true;
this.listScrb = this.listService.list$.pipe(filter(() => this.visable)).subscribe((x) => {
this.data = x.list;
this.listScrb = this.listService.listFlow$.getOutput().subscribe((x) => {
this.configuration.isLoading = false;
if (x[1].length !== 0) return;
this.data = x[0].list;
});
this.listService.listTrigger.next(1);

Expand All @@ -43,7 +41,6 @@ export class ListViewComponent implements OnInit, OnDestroy {

private listScrb: Subscription;
ngOnDestroy() {
this.visable = false;
this.listScrb.unsubscribe();
}
}

0 comments on commit 1d178c7

Please sign in to comment.