Visu Sent Monete
This commit is contained in:
@@ -25,6 +25,12 @@ export const useNotifStore = defineStore('NotifStore', {
|
||||
|
||||
},
|
||||
|
||||
getnotifs_coinsreq: (mystate: INotifState) => (): INotif[] => {
|
||||
const ctrec = (mystate.last_notifs) ? mystate.last_notifs.slice(0, 20).filter((rec) => !rec.read && rec.typedir === shared_consts.TypeNotifs.TYPEDIR_CIRCUITS && rec.typeid === shared_consts.TypeNotifs.ID_CIRCUIT_SENDCOINSREQ) : []
|
||||
return (ctrec)
|
||||
|
||||
},
|
||||
|
||||
getnumNotifUnread: (mystate: INotifState) => () => {
|
||||
const myarr = mystate.last_notifs.filter((notif) => !notif.read)
|
||||
return (tools.isArray(myarr) ? myarr.length : 0)
|
||||
@@ -55,6 +61,19 @@ export const useNotifStore = defineStore('NotifStore', {
|
||||
this.updateArrNotif()
|
||||
},
|
||||
|
||||
updateRecNotif(recnotif: INotif) {
|
||||
if (recnotif) {
|
||||
const myrec = this.last_notifs.find((rec: any) => rec._id === recnotif._id)
|
||||
if (myrec) {
|
||||
myrec.status = recnotif.status
|
||||
myrec.read = recnotif.read
|
||||
myrec.descr = recnotif.descr
|
||||
|
||||
this.updateArrNotif()
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
async setBadgeIconApp(){
|
||||
// Get our dummy count and update it,
|
||||
// just to give more context for this demo.
|
||||
|
||||
Reference in New Issue
Block a user