diff options
Diffstat (limited to 'framework/qml/ConversationListView.qml')
-rw-r--r-- | framework/qml/ConversationListView.qml | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/framework/qml/ConversationListView.qml b/framework/qml/ConversationListView.qml index dcb5e3a4..2f5c5c32 100644 --- a/framework/qml/ConversationListView.qml +++ b/framework/qml/ConversationListView.qml | |||
@@ -60,6 +60,14 @@ FocusScope { | |||
60 | setCurrentItem() | 60 | setCurrentItem() |
61 | } | 61 | } |
62 | 62 | ||
63 | function incrementCurrentIndex() { | ||
64 | flickable.incrementCurrentIndex() | ||
65 | } | ||
66 | |||
67 | function decrementCurrentIndex() { | ||
68 | flickable.decrementCurrentIndex() | ||
69 | } | ||
70 | |||
63 | Flickable { | 71 | Flickable { |
64 | id: flickable | 72 | id: flickable |
65 | anchors.fill: parent | 73 | anchors.fill: parent |
@@ -116,21 +124,13 @@ FocusScope { | |||
116 | if (currentIndex < repeater.count - 1) { | 124 | if (currentIndex < repeater.count - 1) { |
117 | currentIndex = currentIndex + 1 | 125 | currentIndex = currentIndex + 1 |
118 | } | 126 | } |
127 | scrollToIndex(currentIndex) | ||
119 | } | 128 | } |
120 | 129 | ||
121 | function decrementCurrentIndex() { | 130 | function decrementCurrentIndex() { |
122 | if (currentIndex > 0) { | 131 | if (currentIndex > 0) { |
123 | currentIndex = currentIndex - 1 | 132 | currentIndex = currentIndex - 1 |
124 | } | 133 | } |
125 | } | ||
126 | |||
127 | Keys.onDownPressed: { | ||
128 | incrementCurrentIndex() | ||
129 | scrollToIndex(currentIndex) | ||
130 | } | ||
131 | |||
132 | Keys.onUpPressed: { | ||
133 | decrementCurrentIndex() | ||
134 | scrollToIndex(currentIndex) | 134 | scrollToIndex(currentIndex) |
135 | } | 135 | } |
136 | 136 | ||