From 9e035f4f3b3354ce5addb2a87026586dafa41709 Mon Sep 17 00:00:00 2001 From: Avently <7953703+avently@users.noreply.github.com> Date: Sun, 21 Jul 2024 10:53:53 -0700 Subject: [PATCH] changes --- .../Views/Chat/ChatItem/CIVideoView.swift | 21 +++++-------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/apps/ios/Shared/Views/Chat/ChatItem/CIVideoView.swift b/apps/ios/Shared/Views/Chat/ChatItem/CIVideoView.swift index c06b69094e..2e9e727a77 100644 --- a/apps/ios/Shared/Views/Chat/ChatItem/CIVideoView.swift +++ b/apps/ios/Shared/Views/Chat/ChatItem/CIVideoView.swift @@ -107,6 +107,11 @@ struct CIVideoView: View { } } } + .fullScreenCover(isPresented: $showFullScreenPlayer) { + if let decrypted = urlDecrypted { + fullScreenPlayer(decrypted) + } + } .onDisappear { showFullScreenPlayer = false } @@ -125,11 +130,6 @@ struct CIVideoView: View { ZStack(alignment: .center) { let canBePlayed = !chatItem.chatDir.sent || file.fileStatus == CIFileStatus.sndComplete || (file.fileStatus == .sndStored && file.fileProtocol == .local) imageView(defaultPreview) - .fullScreenCover(isPresented: $showFullScreenPlayer) { - if let decrypted = urlDecrypted { - fullScreenPlayer(decrypted) - } - } .onTapGesture { decrypt(file: file) { showFullScreenPlayer = urlDecrypted != nil @@ -170,9 +170,6 @@ struct CIVideoView: View { videoPlaying = false } } - .fullScreenCover(isPresented: $showFullScreenPlayer) { - fullScreenPlayer(url) - } .onTapGesture { switch player.timeControlStatus { case .playing: @@ -215,11 +212,6 @@ struct CIVideoView: View { ZStack(alignment: .topLeading) { let canBePlayed = !chatItem.chatDir.sent || file.fileStatus == CIFileStatus.sndComplete || (file.fileStatus == .sndStored && file.fileProtocol == .local) smallViewImageView(preview, file) - .fullScreenCover(isPresented: $showFullScreenPlayer) { - if let decrypted = urlDecrypted { - fullScreenPlayer(decrypted) - } - } .onTapGesture { decrypt(file: file) { showFullScreenPlayer = urlDecrypted != nil @@ -248,9 +240,6 @@ struct CIVideoView: View { return ZStack(alignment: .center) { ZStack(alignment: .topLeading) { smallViewImageView(preview, file) - .fullScreenCover(isPresented: $showFullScreenPlayer) { - fullScreenPlayer(url) - } .onTapGesture { showFullScreenPlayer = true }