mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
eventtrigger created for notifications
This commit is contained in:
@@ -8,6 +8,7 @@ import { StorageService } from '../../services/storage.service';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { NotificationsService } from '../../services/notifications.service';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { EventTrigger } from '../../services/eventTrigger.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-header',
|
||||
@@ -33,7 +34,8 @@ export class HeaderPage implements OnInit {
|
||||
private animationController: AnimationController,
|
||||
private storageservice: StorageService,
|
||||
private platform: Platform,
|
||||
private notificationsService: NotificationsService,
|
||||
private notificationsService: NotificationsService,
|
||||
private eventrigger: EventTrigger
|
||||
) {
|
||||
this.loggeduser = SessionStore.user;
|
||||
router.events.subscribe((val) => {
|
||||
@@ -46,12 +48,20 @@ export class HeaderPage implements OnInit {
|
||||
this.hideSearch();
|
||||
this.notificationLengthData();
|
||||
|
||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
/* if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
console.log('Notifications not supported')
|
||||
this.UpdateNotificationCount();
|
||||
} else {
|
||||
this.UpdateNotificationCount();
|
||||
}
|
||||
} */
|
||||
|
||||
this.eventrigger.getObservable().subscribe((data)=>{
|
||||
if(data.notification == "delete" || "recive"){
|
||||
this.notificationLengthData();
|
||||
console.log('Deleted notification',data )
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user