fix(iOS): replace lock overlay with allowsHitTesting — icon now reliably unlocks

This commit is contained in:
yumoqing 2026-07-02 22:24:51 +08:00
parent d519e9aa17
commit 58c34250c5

View File

@ -398,6 +398,9 @@ struct PlayerContentView: View {
#endif
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
#if os(iOS)
.allowsHitTesting(!isLocked)
#endif
.onTapGesture(count: 2) {
#if os(iOS)
recordInteraction()
@ -471,19 +474,6 @@ struct PlayerContentView: View {
}
)
// iOS
#if os(iOS)
if isLocked {
Color.black.opacity(0.01)
.ignoresSafeArea()
.allowsHitTesting(true)
.contentShape(Rectangle())
.onTapGesture {
//
}
}
#endif
// 30
VStack {
Spacer()
@ -505,6 +495,9 @@ struct PlayerContentView: View {
if hovering { resetHideTimer() }
}
.transition(.move(edge: .bottom).combined(with: .opacity))
#if os(iOS)
.allowsHitTesting(!isLocked)
#endif
}
}
}