se sei sulla pagina, la notifica di "gia letto" non viene settata.
- aggiunto "RIS" ai tipi di contributi - Amicizia accettata compare 2 volte nelle notifiche - Bottone click sull utente non funziona
This commit is contained in:
@@ -118,6 +118,25 @@ export const useNotifStore = defineStore('NotifStore', {
|
||||
})
|
||||
},
|
||||
|
||||
setRead(_id: string) {
|
||||
return Api.SendReq(`/sendnotif/set/${_id}/${process.env.APP_ID}`, 'GET', null)
|
||||
.then((res) => {
|
||||
// console.log('res', res)
|
||||
if (res) {
|
||||
const rec = this.last_notifs.find((rec: any) => rec._id === _id)
|
||||
if (rec) {
|
||||
rec.read = true
|
||||
}
|
||||
}
|
||||
this.updateArrNotif()
|
||||
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error)
|
||||
return false
|
||||
})
|
||||
},
|
||||
|
||||
deleteRec(username: string, id: string) {
|
||||
return Api.SendReq(`/sendnotif/del/${username}/${id}/${process.env.APP_ID}`, 'GET', null)
|
||||
.then((res) => {
|
||||
|
||||
Reference in New Issue
Block a user