Skip to content

Commit

Permalink
Croptop: Deletion Confirmation
Browse files Browse the repository at this point in the history
  • Loading branch information
livid committed Jul 26, 2023
1 parent bbf7711 commit d60b493
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Planet/versioning.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
CURRENT_PROJECT_VERSION = 1532
CURRENT_PROJECT_VERSION = 1533
12 changes: 6 additions & 6 deletions PlanetLite/AppContentItemView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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) {
Expand Down Expand Up @@ -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 {
Expand All @@ -71,7 +71,7 @@ struct AppContentItemView: View {
}
return photoURLs
}

@ViewBuilder
private func itemPreviewImageView(forArticle article: MyArticleModel) -> some View {
ZStack {
Expand Down

0 comments on commit d60b493

Please sign in to comment.