mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-10-25 21:40:06 +00:00
Use StackView activation callbacks to perform init and cleanup since visibility callbacks aren't guaranteed to run in any order
This commit is contained in:
1 parent
754a14941b
commit
8037fb76fc
7 files changed
+62
-105
No files matched your search
@@ -21,13 +21,8 @@ Item {
|
||||
errorDialog.open()
|
||||
}
|
||||
|
||||
// The StackView will trigger a visibility change when
|
||||
// we're pushed onto it, causing our onVisibleChanged
|
||||
// routine to run, but only if we start as invisible
|
||||
visible: false
|
||||
|
||||
onVisibleChanged: {
|
||||
if (visible && !launcher.isExecuted()) {
|
||||
StackView.onActivated: {
|
||||
if (!launcher.isExecuted()) {
|
||||
toolBar.visible = false
|
||||
launcher.searchingComputer.connect(onSearchingComputer)
|
||||
launcher.quittingApp.connect(onQuittingApp)
|
||||
|
||||
Reference in new issue
Block a user