upload profile picture

This commit is contained in:
Eudes Inácio
2023-09-09 14:40:08 +01:00
parent fb1bd07ad0
commit 42c2fc92ff
5 changed files with 94 additions and 47 deletions
+6 -3
View File
@@ -95,7 +95,7 @@ export class HeaderPage implements OnInit {
this.eventTriger.getObservable().subscribe((event) => {
if (event.notification == "recive") {
console.log('header', event.notification)
this.notificationLength++
this.notificationLengthData()
}
});
@@ -105,21 +105,24 @@ export class HeaderPage implements OnInit {
this.eventTriger.getObservable().subscribe((event) => {
if (event.notification == "deleted") {
console.log('header', event.notification)
this.notificationLength--
this.notificationLengthData()
}
});
}
async notificationLengthData() {
console.log('Call notification data')
await this.storageservice.get("Notifications").then((value) => {
console.log('Get notification data', )
this.notificationLength = value.length;
console.log('Call notification data',this.notificationLength)
}).catch((error) => {
if (!error) {
console.error('header storage get notification', error)
this.notificationLength = 0;
} else {
console.error('header storage get notification', error)