Ver código fonte

add ViewerQuickLook

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana 2 anos atrás
pai
commit
635686778c
1 arquivos alterados com 12 adições e 25 exclusões
  1. 12 25
      iOSClient/Main/Create cloud/NCUploadAssets.swift

+ 12 - 25
iOSClient/Main/Create cloud/NCUploadAssets.swift

@@ -311,31 +311,6 @@ struct UploadAssetsView: View {
                                                 .frame(width: uploadAssets.sizeImagePreview, height: uploadAssets.sizeImagePreview, alignment: .center)
                                                 .cornerRadius(10)
                                                 .scaledToFit()
-                                                .onTapGesture {
-                                                    if item.asset.type == .photo || item.asset.type == .livePhoto {
-                                                        presentedQuickLook(size: max(geo.size.height, geo.size.height), index: index)
-                                                    }
-                                                }
-                                                .onLongPressGesture {
-
-                                                }
-                                                .fullScreenCover(isPresented: $isPresentedQuickLook) {
-                                                    ViewerQuickLook(url: URL(fileURLWithPath: fileNamePath), index: $index, isPresentedQuickLook: $isPresentedQuickLook, uploadAssets: uploadAssets)
-                                                        .ignoresSafeArea()
-                                                }
-                                                .contextMenu {
-                                                    Button {
-                                                        // print("Change country setting")
-                                                    } label: {
-                                                        Label("Choose Country", systemImage: "globe")
-                                                    }
-
-                                                    Button {
-                                                        // print("Enable geolocation")
-                                                    } label: {
-                                                        Label("Detect Location", systemImage: "location.circle")
-                                                    }
-                                                }
                                             if item.asset.type == .livePhoto {
                                                 Image(systemName: "livephoto")
                                                     .resizable()
@@ -354,6 +329,18 @@ struct UploadAssetsView: View {
                                                     .padding(.vertical, 5)
                                             }
                                         }
+                                        .onTapGesture {
+                                            if item.asset.type == .photo || item.asset.type == .livePhoto {
+                                                presentedQuickLook(size: max(geo.size.height, geo.size.height), index: index)
+                                            }
+                                        }
+                                        .onLongPressGesture {
+
+                                        }
+                                        .fullScreenCover(isPresented: $isPresentedQuickLook) {
+                                            ViewerQuickLook(url: URL(fileURLWithPath: fileNamePath), index: $index, isPresentedQuickLook: $isPresentedQuickLook, uploadAssets: uploadAssets)
+                                                .ignoresSafeArea()
+                                        }
                                     }
                                 }
                             }