diff options
Diffstat (limited to 'framework/qml/ConversationView.qml')
-rw-r--r-- | framework/qml/ConversationView.qml | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/framework/qml/ConversationView.qml b/framework/qml/ConversationView.qml index 0fd76f8f..4aa2b2c0 100644 --- a/framework/qml/ConversationView.qml +++ b/framework/qml/ConversationView.qml | |||
@@ -60,6 +60,18 @@ FocusScope { | |||
60 | mail: root.mail | 60 | mail: root.mail |
61 | } | 61 | } |
62 | 62 | ||
63 | Keys.onPressed: { | ||
64 | if (event.text == "j" || event.matches(StandardKey.MoveToNextLine)) { | ||
65 | listView.incrementCurrentIndex() | ||
66 | } else if (event.text == "k" || event.matches(StandardKey.MoveToPreviousLine)) { | ||
67 | listView.decrementCurrentIndex() | ||
68 | } else if (event.text == "d") { | ||
69 | //Not implemented as a shortcut because we want it only to apply if we have the focus | ||
70 | Kube.Fabric.postMessage(Kube.Messages.moveToTrash, {"mail": listView.currentItem.currentData.mail}) | ||
71 | } | ||
72 | } | ||
73 | |||
74 | |||
63 | delegate: FocusScope { | 75 | delegate: FocusScope { |
64 | id: delegateRoot | 76 | id: delegateRoot |
65 | 77 | ||
@@ -77,6 +89,7 @@ FocusScope { | |||
77 | 89 | ||
78 | height: sheet.height + Kube.Units.gridUnit | 90 | height: sheet.height + Kube.Units.gridUnit |
79 | width: listView.width | 91 | width: listView.width |
92 | //FIXME breaks keyboard navigation because we don't jump over invisible items | ||
80 | visible: !((root.hideTrash && model.trash) || (root.hideNonTrash && !model.trash)) | 93 | visible: !((root.hideTrash && model.trash) || (root.hideNonTrash && !model.trash)) |
81 | 94 | ||
82 | MouseArea { | 95 | MouseArea { |