Просмотр исходного кода

add ViewerQuickLook

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana 2 лет назад
Родитель
Сommit
7d5d7bb505

+ 1 - 1
iOSClient/Main/Create cloud/NCUploadAssets.swift

@@ -309,7 +309,7 @@ struct UploadAssetsView: View {
                                                 .frame(width: uploadAssets.sizeImagePreview, height: uploadAssets.sizeImagePreview, alignment: .center)
                                                 .cornerRadius(10)
                                                 .scaledToFit()
-                                            if item.asset.type == .livePhoto {
+                                            if item.asset.type == .livePhoto && !item.hasChanges {
                                                 Image(systemName: "livephoto")
                                                     .resizable()
                                                     .scaledToFit()

+ 1 - 0
iOSClient/Supporting Files/en.lproj/Localizable.strings

@@ -919,6 +919,7 @@
 "_preview_"                 = "Preview";
 "_crop_"                    = "Crop";
 "_modify_photo_desc_"       = "Tap the image for modify photo";
+"_message_disable_livephoto_" = "This image is a Live Photo, changing it will lose the Live effect";
 
 // Video
 "_select_trace_"            = "Select the trace";

+ 1 - 1
iOSClient/Viewer/NCViewerQuickLook/ViewerQuickLook.swift

@@ -33,7 +33,7 @@ struct ViewerQuickLook: UIViewControllerRepresentable {
         uploadAssets.startTimer(navigationItem: controller.navigationItem)
 
         DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
-            if uploadAssets.previewStore[index].asset.type == .livePhoto {
+            if uploadAssets.previewStore[index].asset.type == .livePhoto && !uploadAssets.previewStore[index].hasChanges {
                 let error = NKError(errorCode: NCGlobal.shared.errorCharactersForbidden, errorDescription: "_message_disable_livephoto_")
                 NCContentPresenter.shared.showInfo(error: error)
             }