MOve to Inbox button and keyboard shortcut

This commit is contained in:
Jeffrey Biles
2020-03-19 03:49:43 -07:00
parent e4378d9216
commit 9675e25bcc
2 changed files with 8 additions and 8 deletions

View File

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