keyboard shortcuts for 'archived, then next/previous'

This commit is contained in:
Jeffrey Biles
2020-03-19 03:16:38 -07:00
parent 65c758c90c
commit d427f80182
2 changed files with 8 additions and 2 deletions

View File

@@ -41,13 +41,17 @@
let openEmail = function(email) {
openedEmail.value = email;
if(email) {
openedEmail.value.read = true;
}
}
let changeEmail = function({amount}){
let changeEmail = function({amount, archive}){
let index = emails.findIndex(e => e == openedEmail.value);
if(archive) { emails[index].archived = true }
openEmail(emails[index + amount])
}