Friendship Accepted and Refused (notification updated)

This commit is contained in:
Paolo Arena
2022-07-27 20:55:47 +02:00
parent 43619ec719
commit 7f23fe6d05
10 changed files with 87 additions and 16 deletions

View File

@@ -80,6 +80,12 @@ export default defineComponent({
}
})
watch(() => notifStore.updateNotification, async (to: any, from: any) => {
if (notifStore.updateNotification) {
await refreshdata(userStore.my.username)
}
})
function clickNotif(notif: INotif) {
if (notif.openUrl) {
let mylink = tools.updateQueryStringParameter(notif.openUrl, 'idnotif', notif._id)
@@ -101,7 +107,7 @@ export default defineComponent({
// Get msg for this
let myrec = getlastnotif(username)
const lastdata: any = (myrec) ? myrec.lastdataread : tools.getLastDateReadReset()
const lastdata: any = (myrec && myrec.lastdataread) ? myrec.lastdataread : tools.getLastDateReadReset()
let mydate = ''
if (!tools.isIsoDate(lastdata))
@@ -127,6 +133,7 @@ export default defineComponent({
lastdataread: getlastdataread(username)
}).then((ris) => {
notifStore.updateNotification = false
notifsel.value.dest = username
loading.value = false
@@ -170,6 +177,7 @@ export default defineComponent({
show_all,
t,
username,
userStore,
}
},
})