mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Lot of changes
This commit is contained in:
@@ -27,6 +27,7 @@ export class HeaderPage implements OnInit {
|
||||
DataArray: Array<object> = [];
|
||||
notificationLength: 0;
|
||||
SessionStore = SessionStore
|
||||
check: boolean;
|
||||
|
||||
production = environment.production
|
||||
|
||||
@@ -49,31 +50,22 @@ export class HeaderPage implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
this.hideSearch();
|
||||
this.notificationLengthData();
|
||||
|
||||
this.eventrigger.getObservable().subscribe((data) => {
|
||||
this.update()
|
||||
/* this.notificationLengthData();
|
||||
this.eventrigger.getObservable().subscribe(async (data) => {
|
||||
if (data.notification === "delete" || "recive") {
|
||||
setInterval(()=>
|
||||
{
|
||||
this.notificationLengthData();
|
||||
console.log('SETTIMEOUT')
|
||||
}, 1000);
|
||||
//clearInterval(timer)
|
||||
await this.notificationLengthData();
|
||||
console.log('Current badge: ', this.notificationLength)
|
||||
console.log('Deleted notification', data)
|
||||
console.log('Deleted notification', data.notification)
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
/* if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
console.log('Notifications not supported')
|
||||
this.UpdateNotificationCount();
|
||||
} else {
|
||||
this.UpdateNotificationCount();
|
||||
} */
|
||||
}) */
|
||||
}
|
||||
|
||||
update() {
|
||||
update() {
|
||||
setInterval(() => {
|
||||
this.notificationLengthData();
|
||||
}, 5000)
|
||||
|
||||
}
|
||||
|
||||
@@ -94,9 +86,10 @@ export class HeaderPage implements OnInit {
|
||||
|
||||
/* var data = JSON.parse(value); */
|
||||
this.notificationLength = value.length;
|
||||
console.log('Timer badge count 1', this.notificationLength)
|
||||
})
|
||||
|
||||
console.log('Timer badge count', this.notificationLength)
|
||||
console.log('Timer badge count2', this.notificationLength)
|
||||
}
|
||||
|
||||
hideSearch() {
|
||||
|
||||
Reference in New Issue
Block a user