mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-18 13:41:28 +03:00
All setIntervals on the frontend are now properly destroyed
This commit is contained in:
@@ -42,6 +42,11 @@ export class ConcurrentStreamComponent implements OnInit {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ngOnDestroy(): void {
|
||||||
|
if (this.check_timeout) { clearInterval(this.check_timeout); }
|
||||||
|
if (this.update_timeout) { clearInterval(this.update_timeout); }
|
||||||
|
}
|
||||||
|
|
||||||
startServer() {
|
startServer() {
|
||||||
this.started = true;
|
this.started = true;
|
||||||
this.server_started = true;
|
this.server_started = true;
|
||||||
|
|||||||
@@ -33,7 +33,8 @@ export class TwitchChatComponent implements OnInit, AfterViewInit {
|
|||||||
this.getFullChat();
|
this.getFullChat();
|
||||||
}
|
}
|
||||||
|
|
||||||
ngAfterViewInit() {
|
ngOnDestroy(): void {
|
||||||
|
if (this.chat_check_interval_obj) { clearInterval(this.chat_check_interval_obj); }
|
||||||
}
|
}
|
||||||
|
|
||||||
private isUserNearBottom(): boolean {
|
private isUserNearBottom(): boolean {
|
||||||
|
|||||||
@@ -52,6 +52,8 @@ export class SubscriptionComponent implements OnInit, OnDestroy {
|
|||||||
this.route.params.subscribe(params => {
|
this.route.params.subscribe(params => {
|
||||||
this.id = params['id'];
|
this.id = params['id'];
|
||||||
|
|
||||||
|
if (this.sub_interval) { clearInterval(this.sub_interval); }
|
||||||
|
|
||||||
this.postsService.service_initialized.subscribe(init => {
|
this.postsService.service_initialized.subscribe(init => {
|
||||||
if (init) {
|
if (init) {
|
||||||
this.getConfig();
|
this.getConfig();
|
||||||
|
|||||||
Reference in New Issue
Block a user