Skip to content

Commit

Permalink
fix: automate trigger refresh list
Browse files Browse the repository at this point in the history
trigger event to refresh list when HomeMode to FileMode
  • Loading branch information
ElonH committed May 21, 2020
1 parent 179d5d0 commit 93031d9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/app/pages/manager/homeMode/homeMode.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { UsersService } from '../../users.service';
import { ListRemotesFlow } from 'src/app/@dataflow/rclone';
import { Subject } from 'rxjs';
import { Router, ActivatedRoute } from '@angular/router';
import { OperationsListService } from '../fileMode/operations-list.service';

@Component({
selector: 'manager-homeMode',
Expand All @@ -19,6 +20,7 @@ import { Router, ActivatedRoute } from '@angular/router';
export class HomeModeComponent implements OnInit {
constructor(
private usersService: UsersService,
private listService: OperationsListService,
private route: ActivatedRoute,
private router: Router
) {}
Expand All @@ -29,6 +31,7 @@ export class HomeModeComponent implements OnInit {

click(remote: string) {
this.router.navigate(['.'], { relativeTo: this.route, queryParams: { remote: remote } });
this.listService.listTrigger.next(1);
}

ngOnInit() {
Expand Down

0 comments on commit 93031d9

Please sign in to comment.