Adding keyboard shortcut to toggle notifications [S]
Change-Id: I5d69cb14141f4c484738920efee96f6c117527bc
(cherry picked from commit f37172583a9566708567e55a65f4426e7e5216d7)
diff --git a/src/app/core/header/header.ts b/src/app/core/header/header.ts
index a465f8f..26f6fd0 100644
--- a/src/app/core/header/header.ts
+++ b/src/app/core/header/header.ts
@@ -28,6 +28,7 @@
import {IXosKeyboardShortcutService} from '../services/keyboard-shortcut';
import {Subscription} from 'rxjs';
import {IXosConfigHelpersService} from '../services/helpers/config.helpers';
+import {IXosDebugService} from '../debug/debug.service';
export interface INotification extends IWSEvent {
viewed?: boolean;
@@ -47,7 +48,8 @@
'StyleConfig',
'SearchService',
'XosKeyboardShortcut',
- 'ConfigHelpers'
+ 'ConfigHelpers',
+ 'XosDebug'
];
public notifications: INotification[] = [];
public newNotifications: INotification[] = [];
@@ -73,7 +75,8 @@
private StyleConfig: IXosStyleConfig,
private SearchService: IXosSearchService,
private XosKeyboardShortcut: IXosKeyboardShortcutService,
- private ConfigHelpers: IXosConfigHelpersService
+ private ConfigHelpers: IXosConfigHelpersService,
+ private XosDebugService: IXosDebugService
) {
}
@@ -123,6 +126,12 @@
(event: IWSEvent) => {
this.$scope.$evalAsync(() => {
+ if (!this.XosDebugService.status.notifications) {
+ // NOTE: notifications can be disabled
+ return;
+ }
+
+
if (event.model === 'Diag') {
// NOTE skip notifications for Diag model
return;