Skip to content

Commit

Permalink
Fix FluNavigationView noStackPush
Browse files Browse the repository at this point in the history
Fix FluNavigationView noStackPush to verify if an argument is passed. If true, it is better to set the page has a new one in order to update it with the arguments.
  • Loading branch information
gaetandezeiraud committed Nov 28, 2024
1 parent d13c5a9 commit 282b6eb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Qt5/imports/FluentUI/Controls/FluNavigationView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -1313,7 +1313,7 @@ Item {
d.stackItems = d.stackItems.concat(nav_list.model[nav_list.currentIndex])
}
function noStackPush(){
if(loader_content.source.toString() === url){
if(loader_content.source.toString() === url && Object.keys(argument).length === 0){
return
}
loader_content.setSource(url,argument)
Expand Down
2 changes: 1 addition & 1 deletion src/Qt6/imports/FluentUI/Controls/FluNavigationView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -1314,7 +1314,7 @@ Item {
d.stackItems = d.stackItems.concat(nav_list.model[nav_list.currentIndex])
}
function noStackPush(){
if(loader_content.source.toString() === url){
if(loader_content.source.toString() === url && Object.keys(argument).length === 0){
return
}
loader_content.setSource(url,argument)
Expand Down

0 comments on commit 282b6eb

Please sign in to comment.