diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-04-06 16:45:04 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-04-06 16:45:04 +0200 |
commit | a301d1db33fdecb0e66495b51019922a9b040c1f (patch) | |
tree | daa93751bcfd171b79d116d74f707e88175e0733 /framework/qml/ConversationListView.qml | |
parent | 72a9eeb01cdfd4f0ee5dbffcd3fe083897d8a390 (diff) | |
download | kube-a301d1db33fdecb0e66495b51019922a9b040c1f.tar.gz kube-a301d1db33fdecb0e66495b51019922a9b040c1f.zip |
Conversation view keyboard navigation
Diffstat (limited to 'framework/qml/ConversationListView.qml')
-rw-r--r-- | framework/qml/ConversationListView.qml | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/framework/qml/ConversationListView.qml b/framework/qml/ConversationListView.qml index a7dc1f7d..1d408edc 100644 --- a/framework/qml/ConversationListView.qml +++ b/framework/qml/ConversationListView.qml | |||
@@ -68,14 +68,6 @@ FocusScope { | |||
68 | flickable.decrementCurrentIndex() | 68 | flickable.decrementCurrentIndex() |
69 | } | 69 | } |
70 | 70 | ||
71 | function scrollDown() { | ||
72 | scrollHelper.scrollDown() | ||
73 | } | ||
74 | |||
75 | function scrollUp() { | ||
76 | scrollHelper.scrollUp() | ||
77 | } | ||
78 | |||
79 | Flickable { | 71 | Flickable { |
80 | id: flickable | 72 | id: flickable |
81 | anchors.fill: parent | 73 | anchors.fill: parent |
@@ -145,6 +137,14 @@ FocusScope { | |||
145 | scrollToIndex(currentIndex) | 137 | scrollToIndex(currentIndex) |
146 | } | 138 | } |
147 | 139 | ||
140 | Keys.onPressed: { | ||
141 | if (event.matches(StandardKey.MoveToNextLine)) { | ||
142 | scrollHelper.scrollDown() | ||
143 | } else if (event.matches(StandardKey.MoveToPreviousLine)) { | ||
144 | scrollHelper.scrollUp() | ||
145 | } | ||
146 | } | ||
147 | |||
148 | Kube.ScrollHelper { | 148 | Kube.ScrollHelper { |
149 | id: scrollHelper | 149 | id: scrollHelper |
150 | flickable: flickable | 150 | flickable: flickable |