Allow swipe down to open controls settings on tvOS

This commit is contained in:
Arkadiusz Fal
2022-08-15 00:14:28 +02:00
parent a776b06fc6
commit 4dd9005508
2 changed files with 13 additions and 3 deletions

View File

@@ -142,8 +142,14 @@ struct PlayerControls: View {
}
}
#if os(tvOS)
.onReceive(model.reporter) { _ in
model.show()
.onReceive(model.reporter) { value in
if value == "swipe down", !model.presentingControls, !model.presentingOverlays {
withAnimation(Self.animation) {
model.presentingControlsOverlay = true
}
} else {
model.show()
}
model.resetTimer()
}
#endif