From 971dd0b8ca938c8dab115e6275cdf50e3ea46ed9 Mon Sep 17 00:00:00 2001 From: Livid Date: Wed, 22 Nov 2023 18:59:40 -0800 Subject: [PATCH] Saving changes for Custom Code should trigger a full rebuild --- Planet/Views/My/MyPlanetCustomCodeView.swift | 7 +++---- Planet/versioning.xcconfig | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Planet/Views/My/MyPlanetCustomCodeView.swift b/Planet/Views/My/MyPlanetCustomCodeView.swift index 0ba358cb..d83c25b0 100644 --- a/Planet/Views/My/MyPlanetCustomCodeView.swift +++ b/Planet/Views/My/MyPlanetCustomCodeView.swift @@ -205,11 +205,10 @@ struct MyPlanetCustomCodeView: View { planet.customCodeBodyEnd = customCodeBodyEnd Task { try planet.save() - try planet.copyTemplateAssets() - try planet.articles.forEach { try $0.savePublic() } - try await planet.savePublic() + Task(priority: .background) { + try await planet.rebuild() + } NotificationCenter.default.post(name: .loadArticle, object: nil) - try await planet.publish() } dismiss() } label: { diff --git a/Planet/versioning.xcconfig b/Planet/versioning.xcconfig index db596cd5..ae60215c 100644 --- a/Planet/versioning.xcconfig +++ b/Planet/versioning.xcconfig @@ -1 +1 @@ -CURRENT_PROJECT_VERSION = 1795 +CURRENT_PROJECT_VERSION = 1796