mirror of
git://jb55.com/damus
synced 2024-10-06 11:43:21 +00:00
video-player: add tap gesture to prevent nav
This commit is contained in:
parent
80fac1903e
commit
a1753b2c24
@ -123,9 +123,6 @@ struct ImageCarousel: View {
|
||||
}
|
||||
case .video(let url):
|
||||
DamusVideoPlayer(url: url, video_size: $video_size)
|
||||
.onTapGesture {
|
||||
print("video tap")
|
||||
}
|
||||
.onChange(of: video_size) { size in
|
||||
guard image_fill == nil, let size else {
|
||||
return
|
||||
@ -182,7 +179,7 @@ struct ImageCarousel: View {
|
||||
}
|
||||
|
||||
var Medias: some View {
|
||||
TabView {
|
||||
TabView(selection: $selectedIndex) {
|
||||
ForEach(urls.indices, id: \.self) { index in
|
||||
GeometryReader { geo in
|
||||
Media(geo: geo, url: urls[index], index: index)
|
||||
@ -194,9 +191,6 @@ struct ImageCarousel: View {
|
||||
ImageView(urls: urls, disable_animation: state.settings.disable_animation)
|
||||
}
|
||||
.frame(height: height)
|
||||
.onTapGesture {
|
||||
open_sheet = true
|
||||
}
|
||||
.onChange(of: selectedIndex) { value in
|
||||
selectedIndex = value
|
||||
}
|
||||
@ -206,6 +200,7 @@ struct ImageCarousel: View {
|
||||
var body: some View {
|
||||
VStack {
|
||||
Medias
|
||||
.onTapGesture { }
|
||||
|
||||
// This is our custom carousel image indicator
|
||||
CarouselDotsView(urls: urls, selectedIndex: $selectedIndex)
|
||||
|
@ -28,9 +28,6 @@ struct DamusVideoPlayer: View {
|
||||
.foregroundColor(.black)
|
||||
|
||||
Image(systemName: mute_icon)
|
||||
.onTapGesture {
|
||||
model.muted = !model.muted
|
||||
}
|
||||
.padding()
|
||||
.foregroundColor(.white)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user