Skip to content

Commit 93a9078

Browse files
committed
CU-3w8ybcw more cleanup
1 parent 5755a99 commit 93a9078

1 file changed

Lines changed: 2 additions & 27 deletions

File tree

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,21 @@
1-
import { ChangeDetectorRef, Component, OnInit } from "@angular/core";
2-
import { Store } from "@ngrx/store";
3-
import { DepartmentVoiceChannelResultData } from '@resgrid/ngx-resgridlib';
4-
import { Observable, Subscription } from "rxjs";
5-
import { VoiceState } from "src/app/features/voice/store/voice.store";
6-
import { AudioProvider } from "src/app/providers/audio";
7-
import { OpenViduService } from "src/app/providers/openvidu";
8-
import { selectAvailableChannelsState, selectVoiceState } from "src/app/store";
9-
import * as VoiceActions from "../../actions/voice.actions";
1+
import { Component, OnInit } from "@angular/core";
102

113
@Component({
124
selector: "app-voice-footer",
135
templateUrl: "./voice-footer.component.html",
146
styleUrls: ["./voice-footer.component.scss"],
157
})
168
export class VoiceFooterComponent implements OnInit {
17-
public selectedChannel: DepartmentVoiceChannelResultData;
18-
public isTransmitting: boolean = false;
19-
public voiceState$: Observable<VoiceState | null>;
20-
public availableChannels$: Observable<DepartmentVoiceChannelResultData[] | null>;
219

22-
private participants: number = 0;
23-
private voiceSubscription: Subscription;
24-
private availableChannelsSubscription: Subscription;
10+
constructor() {
2511

26-
constructor(private store: Store<VoiceState>, private audioProvider: AudioProvider,
27-
public openViduService: OpenViduService, private ref: ChangeDetectorRef) {
28-
this.voiceState$ = this.store.select(selectVoiceState);
2912
}
3013

3114
ngOnInit(): void {
3215

3316
}
3417

3518
ngOnDestroy(): void {
36-
if (this.voiceSubscription) {
37-
this.voiceSubscription.unsubscribe();
38-
this.voiceSubscription = null;
39-
}
4019

41-
if (this.availableChannelsSubscription) {
42-
this.availableChannelsSubscription.unsubscribe();
43-
this.availableChannelsSubscription = null;
44-
}
4520
}
4621
}

0 commit comments

Comments
 (0)