mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-30 09:56:14 -05:00
Solve crash bug with toolbar loader when pop push a chat view, loading AvatarOrColorHash from toolbar
This commit is contained in:
parent
80cc1b4520
commit
8ebd0f770f
@ -65,22 +65,8 @@ Item
|
||||
{
|
||||
toolBar.state = "CHATVIEW"
|
||||
gxsInfo= ChatCache.lastMessageCache.getGxsFromChatId(chatView.chatId)
|
||||
toolBar.gxsSource = gxsInfo.gxs
|
||||
toolBar.titleText = gxsInfo.name
|
||||
toolBar.loaderSource = userHash
|
||||
}
|
||||
|
||||
Component
|
||||
{
|
||||
id: userHash
|
||||
|
||||
AvatarOrColorHash
|
||||
{
|
||||
id: colorHash
|
||||
|
||||
gxs_id: gxsInfo.gxs
|
||||
height: toolBar.height - 4
|
||||
anchors.leftMargin: 2
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -56,11 +56,13 @@ ApplicationWindow
|
||||
function addUriHandler(path, fun) { uriHandlersRegister[path] = fun }
|
||||
function delUriHandler(path, fun) { delete uriHandlersRegister[path] }
|
||||
|
||||
|
||||
header: ToolBar
|
||||
{
|
||||
id: toolBar
|
||||
property alias titleText: toolBarText.text
|
||||
property alias loaderSource: imageLoader.sourceComponent
|
||||
property alias gxsSource: imageLoader.gxsSource
|
||||
property string defaultLabel: "RetroShare"
|
||||
|
||||
property var iconsSize: (coreReady)? height - 10 : 0
|
||||
@ -88,6 +90,7 @@ ApplicationWindow
|
||||
{
|
||||
name: "CHATVIEW"
|
||||
PropertyChanges { target: toolBarText; mouseA.visible: false }
|
||||
PropertyChanges { target: toolBar; loaderSource: userHash }
|
||||
// PropertyChanges { target: toolBar; backBtnVisible: true }
|
||||
},
|
||||
State
|
||||
@ -109,8 +112,12 @@ ApplicationWindow
|
||||
{
|
||||
id: imageLoader
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
height: Math.max(30, toolBar.height - 4)
|
||||
height: toolBar.height - 4
|
||||
anchors.left: tolbarLeftPadding.right
|
||||
asynchronous: true
|
||||
|
||||
property string gxsSource;
|
||||
|
||||
}
|
||||
|
||||
Component
|
||||
@ -126,6 +133,21 @@ ApplicationWindow
|
||||
}
|
||||
}
|
||||
|
||||
Component
|
||||
{
|
||||
id: userHash
|
||||
|
||||
AvatarOrColorHash
|
||||
{
|
||||
id: colorHash
|
||||
|
||||
gxs_id: imageLoader.gxsSource
|
||||
height: toolBar.height - 4
|
||||
anchors.leftMargin: 2
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
property alias mouseA: mouseA
|
||||
@ -196,8 +218,7 @@ ApplicationWindow
|
||||
{
|
||||
if (currentItem)
|
||||
{
|
||||
currentItem.forceActiveFocus()
|
||||
setStatus (currentItem)
|
||||
setStatus (currentItem)
|
||||
}
|
||||
}
|
||||
|
||||
@ -230,6 +251,7 @@ ApplicationWindow
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
state: "core_down"
|
||||
initialItem: BusyOverlay { message: qsTr("Connecting to core...") }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user