mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-02 11:26:31 -05:00
Solve bug to get the same index action when stackview is changed without using sidebar
This commit is contained in:
parent
27593633fc
commit
356d3ab09f
@ -44,14 +44,16 @@ Drawer
|
|||||||
|
|
||||||
MouseArea
|
MouseArea
|
||||||
{
|
{
|
||||||
|
property var lastItem
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: parent.height
|
height: parent.height
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
if (listView.currentIndex != index)
|
if (listView.currentIndex != index || stackView.currentItem != lastItem)
|
||||||
{
|
{
|
||||||
listView.currentIndex = index
|
listView.currentIndex = index
|
||||||
menuList.actions[model.title]();
|
menuList.actions[model.title]();
|
||||||
|
lastItem = stackView.currentItem
|
||||||
// titleLabel.text = model.title
|
// titleLabel.text = model.title
|
||||||
// stackView.replace(model.source)
|
// stackView.replace(model.source)
|
||||||
}
|
}
|
||||||
@ -87,6 +89,7 @@ Drawer
|
|||||||
model: ListModel
|
model: ListModel
|
||||||
{
|
{
|
||||||
id: menuList
|
id: menuList
|
||||||
|
|
||||||
property var actions :
|
property var actions :
|
||||||
{
|
{
|
||||||
"Trusted Nodes": function()
|
"Trusted Nodes": function()
|
||||||
@ -95,7 +98,7 @@ Drawer
|
|||||||
},
|
},
|
||||||
"Search Contacts": function(){
|
"Search Contacts": function(){
|
||||||
stackView.push("qrc:/Contacts.qml",
|
stackView.push("qrc:/Contacts.qml",
|
||||||
{'searching': true} )
|
{'searching': true} )
|
||||||
|
|
||||||
},
|
},
|
||||||
"Paste Link": function()
|
"Paste Link": function()
|
||||||
|
Loading…
Reference in New Issue
Block a user