Skip to content

Commit

Permalink
Simplify components-Sailfish/NavigationMenu.qml
Browse files Browse the repository at this point in the history
// Github issue #82
  • Loading branch information
micuintus committed Apr 29, 2017
1 parent 8b05b2d commit 48d0269
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions qml/components-Sailfish/NavigationMenu.qml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import QtQuick 2.2
Silica.PullDownMenu {
id: menu

property Item menuPage
flickable: menuPage.flickable

// Always keep the menu on the current root page
data: [
Connections {
Expand All @@ -14,13 +17,7 @@ Silica.PullDownMenu {
&& "undefined" !== typeof(pageStack.currentPage.flickable)
&& pageStack.depth === 1)
{
menu.flickable = pageStack.currentPage.flickable
pageStack.currentPage.flickableChanged.connect(function() {
if ("undefined" !== typeof(pageStack.currentPage.flickable))
{
menu.flickable = pageStack.currentPage.flickable
}
})
menuPage = pageStack.currentPage
}
}
}]
Expand Down

0 comments on commit 48d0269

Please sign in to comment.