Skip to content

Commit

Permalink
Update to use titlie as drop down selection along with delay in updat…
Browse files Browse the repository at this point in the history
…ing/reloading
  • Loading branch information
Danil Ko committed Sep 4, 2019
1 parent 343cbe5 commit 9f3574d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 1 addition & 3 deletions controller-web/src/main/web/src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@
<div class="col">
<div class="card my-5">
<div class="card-body">
<h1 class="card-title">{{ title }}</h1>
<button mat-icon-button [matMenuTriggerFor]="menu" aria-label="Example icon-button with a menu">
<span><h3>Menu</h3></span>

<h1 class="card-title">{{ title }}</h1>
</button>
<mat-menu #menu="matMenu">
<button mat-menu-item routerLink="/musiclists">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,18 @@ export class MusicRemoteComponent implements OnInit, OnDestroy {

this.musicplayerService.updateMusicPlayerSetting(updateMusicPlayerSetting, elapsedTargetPercentage).subscribe( data => {
this.getMusicPlayerState();
loadingDialogRef.close();

this.delay(5000).then(any=>{
this.getMusicPlayerState();
loadingDialogRef.close();
});
});
}

async delay(ms: number) {
await new Promise(resolve => setTimeout(()=>resolve(), ms)).then(()=>console.log("fired"));
}

getMusicPlayerState(){
this.musicplayerService.getMusicPlayerState().subscribe(data => {
this.currentMusicPlayerState = data;
Expand Down

0 comments on commit 9f3574d

Please sign in to comment.