View selector code refactoring
- Remove initialItem from browseStackView
This meant that the ViewStack always had a QML Item as its first view. I've removed it because some of my later changes meant this would sometimes get added as the second view, which caused visual issues.
- Move common view code into a function
Speaks for itself really
- Refactor view selecting code
Sometimes the sidebar can load after the initial view is loaded, which meant the two viewIndex's could desync. The previous way of solving this involved a load of custom code. I've simplified this to set the sidebar to use the viewManager.viewIndex as it's loaded, and make use of Loader.status to update the sidebar only if it's fully loaded.
Edited by Jack Hill