diff --git a/retroshare-qml-app/src/Contacts.qml b/retroshare-qml-app/src/Contacts.qml index 2039b7a36..5984b0c50 100644 --- a/retroshare-qml-app/src/Contacts.qml +++ b/retroshare-qml-app/src/Contacts.qml @@ -30,7 +30,13 @@ Item property bool searching: false onSearchingChanged: !searching && contactsSortWorker.sendMessage({}) - Component.onCompleted: refreshAll() + property string objectName:"contactsView" + + Component.onCompleted: + { + toolBar.state = "CONTACTSVIEW" + refreshAll() + } onFocusChanged: focus && refreshAll() WorkerScript diff --git a/retroshare-qml-app/src/main-app.qml b/retroshare-qml-app/src/main-app.qml index 6eb594019..ebe1515b5 100644 --- a/retroshare-qml-app/src/main-app.qml +++ b/retroshare-qml-app/src/main-app.qml @@ -74,6 +74,13 @@ ApplicationWindow State { name: "CHATVIEW" + }, + State + { + name: "CONTACTSVIEW" + PropertyChanges { target: toolBar; titleText: defaultLabel} + PropertyChanges { target: toolBar; loaderSource: rsIcon} + PropertyChanges { target: searchIcon; searchIconVisibility: true} } ] @@ -112,19 +119,20 @@ ApplicationWindow BtnIcon { + property bool searchIconVisibility: false + id: searchIcon height: (coreReady)? parent.height - 10 : 0 width: (coreReady)? parent.height - 10 : 0 anchors.verticalCenter: parent.verticalCenter imgUrl: "qrc:/icons/search.svg" anchors.right: menu.left + visible: searchIconVisibility && coreReady onClicked: { stackView.push("qrc:/Contacts.qml", {'searching': true} ) } - - visible: coreReady } MouseArea { @@ -160,7 +168,9 @@ ApplicationWindow { if (currentItem) { - if (currentItem.objectName != "chatView" && toolBar.state != "DEFAULT") + if (currentItem.objectName != "chatView" && + currentItem.objectName != "contactsView" && + toolBar.state != "DEFAULT") { toolBar.state = "DEFAULT" }