Commit 07da8b53 authored by Ronan Abhamon's avatar Ronan Abhamon

fix(ui/modules/Common/Form/SearchBox): emit enter pressed before closed signal

parent f7d8f6ba
...@@ -69,8 +69,8 @@ Item { ...@@ -69,8 +69,8 @@ Item {
Keys.onEscapePressed: searchBox.closeMenu() Keys.onEscapePressed: searchBox.closeMenu()
Keys.onReturnPressed: { Keys.onReturnPressed: {
searchBox.closeMenu()
searchBox.enterPressed() searchBox.enterPressed()
searchBox.closeMenu()
} }
onActiveFocusChanged: { onActiveFocusChanged: {
......
...@@ -6,11 +6,11 @@ import Linphone.Styles 1.0 ...@@ -6,11 +6,11 @@ import Linphone.Styles 1.0
// ============================================================================= // =============================================================================
SearchBox { SearchBox {
id: searchBar id: searchBox
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
readonly property alias isOpen: searchBar._isOpen readonly property alias isOpen: searchBox._isOpen
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
...@@ -29,7 +29,7 @@ SearchBox { ...@@ -29,7 +29,7 @@ SearchBox {
onEnterPressed: { onEnterPressed: {
var sipAddress = view.interpretableSipAddress var sipAddress = view.interpretableSipAddress
return sipAddress.length > 0 && searchBar.launchCall(sipAddress) return sipAddress.length > 0 && searchBox.launchCall(sipAddress)
} }
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
...@@ -40,37 +40,37 @@ SearchBox { ...@@ -40,37 +40,37 @@ SearchBox {
actions: [{ actions: [{
icon: 'video_call', icon: 'video_call',
handler: function (entry) { handler: function (entry) {
searchBar.closeMenu() searchBox.closeMenu()
searchBar.launchVideoCall(entry.sipAddress) searchBox.launchVideoCall(entry.sipAddress)
} }
}, { }, {
icon: 'call', icon: 'call',
handler: function (entry) { handler: function (entry) {
searchBar.closeMenu() searchBox.closeMenu()
searchBar.launchCall(entry.sipAddress) searchBox.launchCall(entry.sipAddress)
} }
}, { }, {
icon: 'chat', icon: 'chat',
handler: function (entry) { handler: function (entry) {
searchBar.closeMenu() searchBox.closeMenu()
searchBar.launchChat(entry.sipAddress) searchBox.launchChat(entry.sipAddress)
} }
}] }]
headerButtonDescription: qsTr('addContact') headerButtonDescription: qsTr('addContact')
headerButtonIcon: 'contact_add' headerButtonIcon: 'contact_add'
headerButtonAction: (function (sipAddress) { headerButtonAction: (function (sipAddress) {
searchBar.closeMenu() searchBox.closeMenu()
searchBar.addContact(sipAddress) searchBox.addContact(sipAddress)
}) })
genSipAddress: searchBar.filter genSipAddress: searchBox.filter
model: SipAddressesProxyModel {} model: SipAddressesProxyModel {}
onEntryClicked: { onEntryClicked: {
searchBar.closeMenu() searchBox.closeMenu()
searchBar.entryClicked(entry) searchBox.entryClicked(entry)
} }
} }
} }
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