mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-03-10 06:56:09 +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: =>
|
_onRemoveFromView: =>
|
||||||
threads = @_threadsForKeyboardAction()
|
threads = @_threadsForKeyboardAction()
|
||||||
|
backspaceDelete = NylasEnv.config.get('core.reading.backspaceDelete')
|
||||||
if threads
|
if threads
|
||||||
if FocusedMailViewStore.mailView().canArchiveThreads()
|
if backspaceDelete
|
||||||
removeMethod = TaskFactory.taskForArchiving
|
if FocusedMailViewStore.mailView().canTrashThreads()
|
||||||
else if FocusedMailViewStore.mailView().canTrashThreads()
|
removeMethod = TaskFactory.taskForMovingToTrash
|
||||||
removeMethod = TaskFactory.taskForMovingToTrash
|
else
|
||||||
else
|
return
|
||||||
return
|
else
|
||||||
|
if FocusedMailViewStore.mailView().canArchiveThreads()
|
||||||
|
removeMethod = TaskFactory.taskForArchiving
|
||||||
|
else
|
||||||
|
return
|
||||||
|
|
||||||
task = removeMethod
|
task = removeMethod
|
||||||
threads: threads
|
threads: threads
|
||||||
|
|
|
@ -57,6 +57,10 @@ module.exports =
|
||||||
type: 'boolean'
|
type: 'boolean'
|
||||||
default: true
|
default: true
|
||||||
title: "Automatically load images in viewed messages"
|
title: "Automatically load images in viewed messages"
|
||||||
|
backspaceDelete:
|
||||||
|
type: 'boolean'
|
||||||
|
default: false
|
||||||
|
title: "Use backspace to delete messages"
|
||||||
sending:
|
sending:
|
||||||
type: 'object'
|
type: 'object'
|
||||||
properties:
|
properties:
|
||||||
|
|
Loading…
Reference in a new issue