summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--framework/qml/ConversationView.qml8
-rw-r--r--framework/qml/MailListView.qml10
-rw-r--r--framework/qml/Messages.qml3
3 files changed, 21 insertions, 0 deletions
diff --git a/framework/qml/ConversationView.qml b/framework/qml/ConversationView.qml
index 4aa2b2c0..8331e581 100644
--- a/framework/qml/ConversationView.qml
+++ b/framework/qml/ConversationView.qml
@@ -62,9 +62,17 @@ FocusScope {
62 62
63 Keys.onPressed: { 63 Keys.onPressed: {
64 if (event.text == "j" || event.matches(StandardKey.MoveToNextLine)) { 64 if (event.text == "j" || event.matches(StandardKey.MoveToNextLine)) {
65 listView.scrollDown()
66 } else if (event.text == "J" || event.matches(StandardKey.MoveToNextPage)) {
65 listView.incrementCurrentIndex() 67 listView.incrementCurrentIndex()
66 } else if (event.text == "k" || event.matches(StandardKey.MoveToPreviousLine)) { 68 } else if (event.text == "k" || event.matches(StandardKey.MoveToPreviousLine)) {
69 listView.scrollUp()
70 } else if (event.text == "K" || event.matches(StandardKey.MoveToPreviousPage)) {
67 listView.decrementCurrentIndex() 71 listView.decrementCurrentIndex()
72 } else if (event.text == "n") {
73 Kube.Fabric.postMessage(Kube.Messages.nextConversation, {})
74 } else if (event.text == "p") {
75 Kube.Fabric.postMessage(Kube.Messages.previousConversation, {})
68 } else if (event.text == "d") { 76 } else if (event.text == "d") {
69 //Not implemented as a shortcut because we want it only to apply if we have the focus 77 //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}) 78 Kube.Fabric.postMessage(Kube.Messages.moveToTrash, {"mail": listView.currentItem.currentData.mail})
diff --git a/framework/qml/MailListView.qml b/framework/qml/MailListView.qml
index eb124102..ff72a59c 100644
--- a/framework/qml/MailListView.qml
+++ b/framework/qml/MailListView.qml
@@ -60,6 +60,16 @@ FocusScope {
60 text: qsTr("Nothing here...") 60 text: qsTr("Nothing here...")
61 } 61 }
62 62
63 Kube.Listener {
64 filter: Kube.Messages.nextConversation
65 onMessageReceived: listView.incrementCurrentIndex()
66 }
67
68 Kube.Listener {
69 filter: Kube.Messages.previousConversation
70 onMessageReceived: listView.decrementCurrentIndex()
71 }
72
63 ColumnLayout { 73 ColumnLayout {
64 anchors.fill: parent 74 anchors.fill: parent
65 75
diff --git a/framework/qml/Messages.qml b/framework/qml/Messages.qml
index 35aa750a..a3f6ef00 100644
--- a/framework/qml/Messages.qml
+++ b/framework/qml/Messages.qml
@@ -51,5 +51,8 @@ Item {
51 property string sendOutbox: "sendOutbox" 51 property string sendOutbox: "sendOutbox"
52 52
53 property string componentDone: "done" 53 property string componentDone: "done"
54
55 property string nextConversation: "nextConversation"
56 property string previousConversation: "previousConversation"
54} 57}
55 58