Skip to content

Commit

Permalink
Do a publish after a post is deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
livid committed Jun 28, 2023
1 parent 1e35480 commit eb3d055
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 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 = 1444
CURRENT_PROJECT_VERSION = 1445
7 changes: 5 additions & 2 deletions PlanetLite/AppContentItemView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ struct AppContentItemView: View {
AppContentItemMenuView(isShowingDeleteConfirmation: $isShowingDeleteConfirmation, isSharingLink: $isSharingLink, sharedLink: $sharedLink, article: article)
}
.confirmationDialog(
Text("Are you sure you want to delete this article?"),
Text("Are you sure you want to delete this post?"),
isPresented: $isShowingDeleteConfirmation
) {
Button(role: .destructive) {
Expand All @@ -50,7 +50,10 @@ struct AppContentItemView: View {
article.delete()
planet.updated = Date()
try planet.save()
try planet.savePublic()
Task {
try planet.savePublic()
try await planet.publish()
}
Task { @MainActor in
AppContentDetailsWindowManager.shared.deactivateWindowController(forArticle: article)
planetStore.selectedView = .myPlanet(planet)
Expand Down

0 comments on commit eb3d055

Please sign in to comment.