mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-03-09 22:45:16 +08:00
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:
parent
bd9181f62e
commit
da56a9b5c8
2 changed files with 15 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue