refactor(settings): replace unsubscribe logic with takeUntilDestroyed for better resource management (#443)

* refactor(settings): replace unsubscribe logic with takeUntilDestroyed for better resource management

* refactor(settings): streamline saveSettings method and improve error handling

* fix(settings): improve error handling in saveSetting method

* refactor(settings): update tab structure

* refactor(settings): implement OnDestroy interface and clean up unused destroyRef instances
This commit is contained in:
brios
2026-04-22 17:27:11 -04:00
committed by Zach Yale
parent 85e8d235b6
commit 7abac02b0c
25 changed files with 218 additions and 180 deletions
@@ -17,6 +17,7 @@ export class NotificationEventService {
notificationHighlight$ = this.notificationHighlightSubject.asObservable();
private highlightTimeout: ReturnType<typeof setTimeout> | undefined;
private clearTimeout: ReturnType<typeof setTimeout> | undefined;
handleNewNotification(notification: LogNotification): void {
this.latestNotificationSubject.next(notification);
@@ -25,12 +26,15 @@ export class NotificationEventService {
if (this.highlightTimeout) {
clearTimeout(this.highlightTimeout);
}
if (this.clearTimeout) {
clearTimeout(this.clearTimeout);
}
this.highlightTimeout = setTimeout(() => {
this.notificationHighlightSubject.next(false);
}, 7500);
setTimeout(() => {
this.clearTimeout = setTimeout(() => {
if (!this.notificationHighlightSubject.value) {
this.latestNotificationSubject.next(null);
}