diff --git a/src/mainview/components/ContactSearchBar.qml b/src/mainview/components/ContactSearchBar.qml index 40704ff8..6db304f7 100644 --- a/src/mainview/components/ContactSearchBar.qml +++ b/src/mainview/components/ContactSearchBar.qml @@ -27,12 +27,6 @@ Rectangle { signal contactSearchBarTextChanged(string text) - // Hack - there is no real way now to make TextField lose its focus, - // unless transfer it to other component. - function clearFocus() { - fakeFocus.forceActiveFocus() - } - function clearText() { contactSearchBar.clear() fakeFocus.forceActiveFocus() diff --git a/src/mainview/components/ConversationSmartListView.qml b/src/mainview/components/ConversationSmartListView.qml index 001bed35..7f8c16f9 100644 --- a/src/mainview/components/ConversationSmartListView.qml +++ b/src/mainview/components/ConversationSmartListView.qml @@ -29,10 +29,8 @@ ListView { signal needToAccessMessageWebView(string currentUserDisplayName, string currentUserAlias, string currentUID, bool callStackViewShouldShow, bool isAudioOnly, int callState) signal needToSelectItems(string conversationUid) signal needToDeselectItems - signal needToGrabFocus signal needToShowChatView(string accountId, string convUid) - signal currentIndexIsChanged signal forceUpdatePotentialInvalidItem // Refresh all items within the model. @@ -81,10 +79,6 @@ ListView { function onUpdateSmartList() { updateListView() } } - onCurrentIndexChanged: { - root.currentIndexIsChanged() - } - clip: true delegate: ConversationSmartListViewItemDelegate { diff --git a/src/mainview/components/ConversationSmartListViewItemDelegate.qml b/src/mainview/components/ConversationSmartListViewItemDelegate.qml index 12cc257d..f7a415ad 100644 --- a/src/mainview/components/ConversationSmartListViewItemDelegate.qml +++ b/src/mainview/components/ConversationSmartListViewItemDelegate.qml @@ -42,7 +42,7 @@ ItemDelegate { // When currentIndex is -1, deselect items, if not, change select item - function onCurrentIndexIsChanged() { + function onCurrentIndexChanged() { if (conversationSmartListView.currentIndex === -1 || conversationSmartListView.currentIndex !== index) { itemSmartListBackground.color = Qt.binding(function () { @@ -55,7 +55,6 @@ ItemDelegate { 1.8) : JamiTheme.releaseColor }) conversationSmartListView.needToSelectItems(UID) - conversationSmartListView.needToGrabFocus() } } diff --git a/src/mainview/components/SidePanel.qml b/src/mainview/components/SidePanel.qml index 3fdbb7c0..de122ebc 100644 --- a/src/mainview/components/SidePanel.qml +++ b/src/mainview/components/SidePanel.qml @@ -46,8 +46,7 @@ Rectangle { // For contact request conv to be focused correctly. function setCurrentUidSmartListModelIndex() { conversationSmartListView.currentIndex - = conversationSmartListView.model.currentUidSmartListModelIndex( - ) + = conversationSmartListView.model.currentUidSmartListModelIndex() } function updatePendingRequestCount() { @@ -205,10 +204,6 @@ Rectangle { isAudioOnly, callState) } - onNeedToGrabFocus: { - contactSearchBar.clearFocus() - } - Component.onCompleted: { ConversationsAdapter.setQmlObject(this) conversationSmartListView.currentIndex = -1