Autoclose completer when space is pressed and no suggestion available

pull/432/head
Nicolas Werner 4 years ago
parent 498bfb89b3
commit d1280af2e4
  1. 1
      resources/qml/Completer.qml
  2. 3
      resources/qml/MessageInput.qml
  3. 2
      resources/qml/TimelineView.qml

@ -11,6 +11,7 @@ Popup {
property string completerName
property var completer
property bool bottomToTop: true
property alias count: listView.count
signal completionClicked(string completion)

@ -162,6 +162,9 @@ Rectangle {
if (event.matches(StandardKey.Paste)) {
TimelineManager.timeline.input.paste(false);
event.accepted = true;
} else if (event.key == Qt.Key_Space) {
if (popup.opened && popup.count <= 0)
popup.close()
} else if (event.modifiers == Qt.ControlModifier && event.key == Qt.Key_U) {
messageInput.clear();
} else if (event.modifiers == Qt.ControlModifier && event.key == Qt.Key_P) {

@ -35,7 +35,7 @@ Page {
colors: palette
model: EmojiProxyModel {
category: EmojiCategory.People
category: Emoji.Category.People
sourceModel: EmojiModel {
}

Loading…
Cancel
Save