Change backspace behavior

There is a setting so that the backspace can delete messages instead of archiving.
I think that backspace must delete the message, but like many other clients, you have the choice.
This commit is contained in:
Yoeri Stessens 2015-11-24 19:21:20 +01:00
parent bd9181f62e
commit da56a9b5c8
2 changed files with 15 additions and 6 deletions

View file

@ -284,13 +284,18 @@ class ThreadList extends React.Component
_onRemoveFromView: =>
threads = @_threadsForKeyboardAction()
backspaceDelete = NylasEnv.config.get('core.reading.backspaceDelete')
if threads
if FocusedMailViewStore.mailView().canArchiveThreads()
removeMethod = TaskFactory.taskForArchiving
else if FocusedMailViewStore.mailView().canTrashThreads()
removeMethod = TaskFactory.taskForMovingToTrash
else
return
if backspaceDelete
if FocusedMailViewStore.mailView().canTrashThreads()
removeMethod = TaskFactory.taskForMovingToTrash
else
return
else
if FocusedMailViewStore.mailView().canArchiveThreads()
removeMethod = TaskFactory.taskForArchiving
else
return
task = removeMethod
threads: threads

View file

@ -57,6 +57,10 @@ module.exports =
type: 'boolean'
default: true
title: "Automatically load images in viewed messages"
backspaceDelete:
type: 'boolean'
default: false
title: "Use backspace to delete messages"
sending:
type: 'object'
properties: