mirror of
https://github.com/kevin-DL/build-gmail-clone-with-vue-3.git
synced 2026-01-21 06:44:58 +00:00
MOve to Inbox button and keyboard shortcut
This commit is contained in:
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user