Mark read and unread

This commit is contained in:
Jeffrey Biles
2020-03-17 22:52:30 -07:00
parent e21425c1ea
commit ce96221a71
3 changed files with 15 additions and 3 deletions

View File

@@ -5,12 +5,22 @@ export const useEmailSelection = function(){
let emailSelection = reactive({
emails: emails,
toggle: function(id) {
toggle(id) {
if(this.emails.has(id)) {
this.emails.delete(id)
} else {
this.emails.add(id);
}
},
markRead(){
this.emails.forEach(email => {
email.read = true
})
},
markUnread(){
this.emails.forEach(email => {
email.read = false
})
}
})