This commit is contained in:
Peter Maquiran
2024-06-27 17:43:44 +01:00
parent 11587cc944
commit ac0ead4885
5 changed files with 52 additions and 34 deletions
@@ -40,6 +40,9 @@ export class NotificationRepositoryService {
if(result.isOk()) {
console.log('notification-list', result.value.data.result)
const serverListFiltered = result.value.data.result.filter( e => e.body != 'Foi editado um evento na vossa agenda' && e.body != 'Foi apagado um evento na vossa agenda')
result.value.data.result = serverListFiltered
if(result.value.data.result.length >= 1) {
const localList = await this.LocalNotificationService.getNotification()
const serverList = NotificationListMapper(result.value)
@@ -74,6 +77,15 @@ export class NotificationRepositoryService {
return
}
async RemoveNotificationStatus(item: NotificationTable) {
await this.RemoteNotificationService.notificationStatus(item.notificationId)
item.status = true
this.LocalNotificationService.updateNotification(item)
this.init()
return
}
async localNotificationStatus(item: NotificationTable) {
item.status = true
this.LocalNotificationService.updateNotification(item)