Friendship Accepted and Refused (notification updated)
This commit is contained in:
@@ -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,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user