diff --git a/Packages/ComposeUI/Sources/ComposeUI/Controllers/ComposeController.swift b/Packages/ComposeUI/Sources/ComposeUI/Controllers/ComposeController.swift index c1d645c0..93682956 100644 --- a/Packages/ComposeUI/Sources/ComposeUI/Controllers/ComposeController.swift +++ b/Packages/ComposeUI/Sources/ComposeUI/Controllers/ComposeController.swift @@ -58,7 +58,7 @@ public final class ComposeController: ViewController { private var isDisappearing = false private var userConfirmedDelete = false - var isPosting: Bool { + public var isPosting: Bool { poster != nil } @@ -424,6 +424,7 @@ public final class ComposeController: ViewController { // otherwise all Buttons in the nav bar are made semibold .font(.system(size: 17, weight: .regular)) } + .disabled(controller.isPosting) .confirmationDialog("Are you sure?", isPresented: $controller.isShowingSaveDraftSheet) { // edit drafts can't be saved if draft.editedStatusID == nil { diff --git a/Tusker/Screens/Compose/ComposeHostingController.swift b/Tusker/Screens/Compose/ComposeHostingController.swift index 6259771d..6e8e7580 100644 --- a/Tusker/Screens/Compose/ComposeHostingController.swift +++ b/Tusker/Screens/Compose/ComposeHostingController.swift @@ -144,7 +144,9 @@ class ComposeHostingController: UIHostingController DuckAttemptAction { - if controller.draft.hasContent { + if controller.isPosting { + return .block + } else if controller.draft.hasContent { return .duck } else { return .dismiss