Discard subscriptions

This commit is contained in:
shamoon 2023-12-31 10:21:57 -08:00 committed by Moritz Pflanzer
parent b7cac15901
commit 026506e2d1

View File

@ -196,7 +196,10 @@ export class ProfileEditDialogComponent implements OnInit, OnDestroy {
}
disconnectSocialAccount(id: number): void {
this.profileService.disconnectSocialAccount(id).subscribe({
this.profileService
.disconnectSocialAccount(id)
.pipe(takeUntil(this.unsubscribeNotifier))
.subscribe({
next: (id: number) => {
this.socialAccounts = this.socialAccounts.filter((a) => a.id != id)
},