1
0
Fork 0

Launcher: if user has favorites defined, show them.

Suggested by Henning, that if the user has defined favorite aircraft,
default to that tab.

Will pick to 2020.2 once verified.
This commit is contained in:
James Turner 2020-06-20 14:05:37 +01:00
parent 59a7d50fb1
commit 7d7b7b3bd1

View file

@ -17,8 +17,16 @@ FocusScope
} }
} }
state: "installed"
Component.onCompleted: { Component.onCompleted: {
_launcher.browseAircraftModel.loadRatingsSettings(); _launcher.browseAircraftModel.loadRatingsSettings();
// if the user has favourites defined, default to that tab
if (_launcher.favouriteAircraftModel.count > 0) {
root.state = "favourites"
root.updateSelectionFromLauncher();
}
} }
Rectangle Rectangle
@ -188,8 +196,6 @@ FocusScope
visible: (root.state == "updates") && (_launcher.aircraftWithUpdatesModel.count == 0) visible: (root.state == "updates") && (_launcher.aircraftWithUpdatesModel.count == 0)
} }
state: "installed"
states: [ states: [
State { State {
name: "installed" name: "installed"