From d60b493db609c5ea783e0816f47f26b74622c301 Mon Sep 17 00:00:00 2001 From: Xin Liu Date: Tue, 25 Jul 2023 23:39:06 -0700 Subject: [PATCH] Croptop: Deletion Confirmation --- Planet/versioning.xcconfig | 2 +- PlanetLite/AppContentItemView.swift | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Planet/versioning.xcconfig b/Planet/versioning.xcconfig index e2e7ddd6..7616d8e0 100644 --- a/Planet/versioning.xcconfig +++ b/Planet/versioning.xcconfig @@ -1 +1 @@ -CURRENT_PROJECT_VERSION = 1532 +CURRENT_PROJECT_VERSION = 1533 diff --git a/PlanetLite/AppContentItemView.swift b/PlanetLite/AppContentItemView.swift index 1d1835cd..e4e85504 100644 --- a/PlanetLite/AppContentItemView.swift +++ b/PlanetLite/AppContentItemView.swift @@ -9,16 +9,16 @@ import ASMediaView struct AppContentItemView: View { @EnvironmentObject private var planetStore: PlanetStore - + var article: MyArticleModel var size: NSSize - + @State private var isShowingDeleteConfirmation = false @State private var isSharingLink: Bool = false @State private var sharedLink: String? @State private var thumbnail: NSImage? @State private var thumbnailCachedPath: URL? - + var body: some View { itemPreviewImageView(forArticle: self.article) .onTapGesture { @@ -28,7 +28,7 @@ struct AppContentItemView: View { AppContentItemMenuView(isShowingDeleteConfirmation: $isShowingDeleteConfirmation, isSharingLink: $isSharingLink, sharedLink: $sharedLink, article: article) } .confirmationDialog( - Text("Are you sure you want to delete this post?"), + Text("Are you sure you want to delete this post?\n\n\(article.title)?\n\nThis action cannot be undone."), isPresented: $isShowingDeleteConfirmation ) { Button(role: .destructive) { @@ -59,7 +59,7 @@ struct AppContentItemView: View { SharingServicePicker(isPresented: $isSharingLink, sharingItems: [sharedLink ?? ""]) ) } - + private func getPhotos(fromArticle article: MyArticleModel) -> [URL] { var photoURLs: [URL] = [] if let attachmentNames: [String] = article.attachments { @@ -71,7 +71,7 @@ struct AppContentItemView: View { } return photoURLs } - + @ViewBuilder private func itemPreviewImageView(forArticle article: MyArticleModel) -> some View { ZStack {