mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-02 03:16:18 -05:00
Call toolbar change state when pop stackview
This commit is contained in:
parent
d19950f0df
commit
80cc1b4520
@ -58,12 +58,16 @@ Item
|
|||||||
Component.onCompleted:
|
Component.onCompleted:
|
||||||
{
|
{
|
||||||
refreshData()
|
refreshData()
|
||||||
|
}
|
||||||
|
onFocusChanged: focus && refreshData()
|
||||||
|
|
||||||
|
function changeState ()
|
||||||
|
{
|
||||||
toolBar.state = "CHATVIEW"
|
toolBar.state = "CHATVIEW"
|
||||||
gxsInfo= ChatCache.lastMessageCache.getGxsFromChatId(chatView.chatId)
|
gxsInfo= ChatCache.lastMessageCache.getGxsFromChatId(chatView.chatId)
|
||||||
toolBar.titleText = gxsInfo.name
|
toolBar.titleText = gxsInfo.name
|
||||||
toolBar.loaderSource = userHash
|
toolBar.loaderSource = userHash
|
||||||
}
|
}
|
||||||
onFocusChanged: focus && refreshData()
|
|
||||||
|
|
||||||
Component
|
Component
|
||||||
{
|
{
|
||||||
|
@ -34,12 +34,16 @@ Item
|
|||||||
|
|
||||||
Component.onCompleted:
|
Component.onCompleted:
|
||||||
{
|
{
|
||||||
toolBar.state = "CONTACTSVIEW"
|
|
||||||
toolBar.searchBtnCb = toggleSearchBox
|
|
||||||
refreshAll()
|
refreshAll()
|
||||||
}
|
}
|
||||||
onFocusChanged: focus && refreshAll()
|
onFocusChanged: focus && refreshAll()
|
||||||
|
|
||||||
|
function changeState ()
|
||||||
|
{
|
||||||
|
toolBar.state = "CONTACTSVIEW"
|
||||||
|
toolBar.searchBtnCb = toggleSearchBox
|
||||||
|
}
|
||||||
|
|
||||||
WorkerScript
|
WorkerScript
|
||||||
{
|
{
|
||||||
id: contactsSortWorker
|
id: contactsSortWorker
|
||||||
|
@ -221,17 +221,15 @@ ApplicationWindow
|
|||||||
{
|
{
|
||||||
toolBar.state = "DEFAULT"
|
toolBar.state = "DEFAULT"
|
||||||
}
|
}
|
||||||
|
else if (typeof currentItem.changeState === 'function')
|
||||||
|
{
|
||||||
|
currentItem.changeState ()
|
||||||
|
}
|
||||||
|
|
||||||
currentItem.focus = true
|
currentItem.focus = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Keys.onReleased:
|
|
||||||
if (event.key === Qt.Key_Back && stackView.depth > 1)
|
|
||||||
{
|
|
||||||
stackView.pop();
|
|
||||||
event.accepted = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
state: "core_down"
|
state: "core_down"
|
||||||
initialItem: BusyOverlay { message: qsTr("Connecting to core...") }
|
initialItem: BusyOverlay { message: qsTr("Connecting to core...") }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user