Commit 491ceedd authored by Ronan Abhamon's avatar Ronan Abhamon

feat(ui/modules/Linphone/SmartSearchBar): handle enter pressed

parent 83dfe783
......@@ -32,6 +32,7 @@ Item {
signal menuClosed
signal menuOpened
signal enterPressed
// ---------------------------------------------------------------------------
......@@ -72,6 +73,10 @@ Item {
width: parent.width
Keys.onEscapePressed: searchBox.hideMenu()
Keys.onReturnPressed: {
searchBox.hideMenu()
searchBox.enterPressed()
}
onActiveFocusChanged: activeFocus && searchBox.showMenu()
onTextChanged: _filter(text)
......
......@@ -12,6 +12,12 @@ SearchBox {
// ---------------------------------------------------------------------------
readonly property string interpretableSipAddress: SipAddressesModel.interpretUrl(
searchBox.filter
)
// ---------------------------------------------------------------------------
signal addContact (string sipAddress)
signal launchChat (string sipAddress)
signal launchCall (string sipAddress)
......@@ -19,14 +25,15 @@ SearchBox {
signal entryClicked (var entry)
// ---------------------------------------------------------------------------
onEnterPressed: interpretableSipAddress.length > 0 && searchBox.launchCall(interpretableSipAddress)
// ---------------------------------------------------------------------------
// Header.
// ---------------------------------------------------------------------------
header: MouseArea {
readonly property string interpretableSipAddress: SipAddressesModel.interpretUrl(
searchBox.filter
)
height: {
var height = SmartSearchBarStyle.header.addButtonHeight
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment