archive shortcut

This commit is contained in:
Jeffrey Biles
2020-03-19 03:36:46 -07:00
parent 327e9b5835
commit 0127326c75
2 changed files with 3 additions and 1 deletions

View File

@@ -47,10 +47,11 @@
}
}
function changeEmail(emails, {amount, archive}){
function changeEmail(emails, {amount, archive, closeModal}){
let index = emails.findIndex(e => e == openedEmail.value);
if(archive) { emails[index].archived = true }
if(closeModal) { openedEmail.value = null; return null; }
openEmail(emails[index + amount])
}