mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-04-17 11:58:27 +00:00
force focusing chat search bar when research done (otherwise focus is lost if chat previsouly focused becomes invisible) #LINQT-2377
This commit is contained in:
parent
49bc5de54e
commit
5bb9c1a6a4
2 changed files with 10 additions and 0 deletions
|
|
@ -37,10 +37,15 @@ ListView {
|
|||
signal markAllAsRead()
|
||||
signal chatClicked(ChatGui chat)
|
||||
|
||||
property bool makingResearch: false
|
||||
signal researchDone()
|
||||
onResearchDone: makingResearch = false
|
||||
|
||||
model: ChatProxy {
|
||||
id: chatProxy
|
||||
filterText: mainItem.searchText
|
||||
onFilterTextChanged: {
|
||||
mainItem.makingResearch = true
|
||||
chatToSelectLater = currentChatGui
|
||||
}
|
||||
onModelAboutToBeReset: {
|
||||
|
|
@ -58,6 +63,7 @@ ListView {
|
|||
} else {
|
||||
selectChat(mainItem.currentChatGui)
|
||||
}
|
||||
mainItem.researchDone()
|
||||
}
|
||||
onChatAdded: (chat) => {
|
||||
mainItem.chatToSelect = chat
|
||||
|
|
|
|||
|
|
@ -227,6 +227,10 @@ AbstractMainPage {
|
|||
searchBar: searchBar
|
||||
Control.ScrollBar.vertical: scrollbar
|
||||
|
||||
onResearchDone: {
|
||||
searchBar.forceActiveFocus()
|
||||
}
|
||||
|
||||
onCurrentChatGuiChanged: {
|
||||
mainItem.selectedChatGui = currentChatGui
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue