Skip to content
Permalink
Browse files

Simplified logic

  • Loading branch information
martonborzak committed Jan 3, 2020
1 parent 7c2b242 commit 67021678672e14b06fc01b36dd4e8066759cc05f
Showing with 9 additions and 6 deletions.
  1. +7 −2 MainContainer.qml
  2. +2 −4 main.qml
@@ -123,7 +123,7 @@ Item {
property int itemsLoaded: 0
property bool startUp: false

signal loadedItems(int items)
signal loadedItems()

SwipeView {
id: mainNavigationSwipeview
@@ -161,7 +161,12 @@ Item {
onStatusChanged: {
if (mainNavigationLoader.status == Loader.Ready) {
itemsLoaded += 1;
main_container.loadedItems(itemsLoaded);
console.debug("PAGE LOADED: " + itemsLoaded);

if (itemsLoaded === mainNavigation.menuConfig.count) {
console.debug("ALL PAGES LOADED. SENDING SIGNAL.");
main_container.loadedItems();
}
}
}
}
@@ -368,10 +368,8 @@ ApplicationWindow {
ignoreUnknownSignals: true

onLoadedItems: {
if (items === loader_main.item.mainNavigation.menuConfig.count) {
console.debug("Setting loading screen to loaded");
loadingScreen.item.state = "loaded";
}
console.debug("Setting loading screen to loaded");
loadingScreen.item.state = "loaded";
}
}
}

0 comments on commit 6702167

Please sign in to comment.
You can’t perform that action at this time.