1
0
mirror of git://jb55.com/damus synced 2024-10-06 03:33:22 +00:00

video-player: add tap gesture to prevent nav

This commit is contained in:
William Casarin 2023-05-30 10:30:48 -07:00
parent 80fac1903e
commit a1753b2c24
2 changed files with 2 additions and 10 deletions

View File

@ -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)

View File

@ -28,9 +28,6 @@ struct DamusVideoPlayer: View {
.foregroundColor(.black)
Image(systemName: mute_icon)
.onTapGesture {
model.muted = !model.muted
}
.padding()
.foregroundColor(.white)
}