diff options
Diffstat (limited to 'framework/qml/MailListView.qml')
-rw-r--r-- | framework/qml/MailListView.qml | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/framework/qml/MailListView.qml b/framework/qml/MailListView.qml index 55a3aaff..eb124102 100644 --- a/framework/qml/MailListView.qml +++ b/framework/qml/MailListView.qml | |||
@@ -16,7 +16,7 @@ | |||
16 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 16 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
17 | */ | 17 | */ |
18 | 18 | ||
19 | import QtQuick 2.7 | 19 | import QtQuick 2.9 |
20 | import QtQuick.Controls 2.0 | 20 | import QtQuick.Controls 2.0 |
21 | import QtQuick.Controls 1.4 as Controls | 21 | import QtQuick.Controls 1.4 as Controls |
22 | import QtQuick.Layouts 1.1 | 22 | import QtQuick.Layouts 1.1 |
@@ -48,7 +48,7 @@ FocusScope { | |||
48 | } | 48 | } |
49 | 49 | ||
50 | Shortcut { | 50 | Shortcut { |
51 | sequence: StandardKey.Delete | 51 | sequences: [StandardKey.Delete] |
52 | enabled: !isTrash | 52 | enabled: !isTrash |
53 | onActivated: Kube.Fabric.postMessage(Kube.Messages.moveToTrash, {"mail":currentMail}) | 53 | onActivated: Kube.Fabric.postMessage(Kube.Messages.moveToTrash, {"mail":currentMail}) |
54 | } | 54 | } |
@@ -121,12 +121,17 @@ FocusScope { | |||
121 | } | 121 | } |
122 | } | 122 | } |
123 | 123 | ||
124 | Keys.onDownPressed: { | 124 | Keys.onPressed: { |
125 | incrementCurrentIndex() | 125 | if (event.text == "j" || event.matches(StandardKey.MoveToNextLine)) { |
126 | } | 126 | incrementCurrentIndex() |
127 | Keys.onUpPressed: { | 127 | } else if (event.text == "k" || event.matches(StandardKey.MoveToPreviousLine)) { |
128 | decrementCurrentIndex() | 128 | decrementCurrentIndex() |
129 | } else if (event.text == "d") { | ||
130 | //Not implemented as a shortcut because we want it only to apply if we have the focus | ||
131 | Kube.Fabric.postMessage(Kube.Messages.moveToTrash, {"mail": root.currentMail}) | ||
132 | } | ||
129 | } | 133 | } |
134 | |||
130 | //END keyboard nav | 135 | //END keyboard nav |
131 | 136 | ||
132 | onCurrentItemChanged: { | 137 | onCurrentItemChanged: { |