Only show logged-in requirement if logged out

This commit is contained in:
Angelo Stavrow 2020-12-18 10:23:52 -05:00
parent 4ec81ccfbf
commit 554ca83014
No known key found for this signature in database
GPG Key ID: 1A49C7064E060EEE

View File

@ -13,7 +13,7 @@ struct ActivePostToolbarView: View {
.help("Copy the post's URL to your Mac's pasteboard.") .help("Copy the post's URL to your Mac's pasteboard.")
Button(action: { publishPost(activePost) }, label: { Image(systemName: "paperplane") }) Button(action: { publishPost(activePost) }, label: { Image(systemName: "paperplane") })
.disabled(activePost.body.isEmpty || activePost.status == PostStatus.published.rawValue) .disabled(activePost.body.isEmpty || activePost.status == PostStatus.published.rawValue)
.help("Publish the post to the web. You must be logged in to do this.") .help("Publish the post to the web.\(model.account.isLoggedIn ? "" : "You must be logged in to do this.")") // swiftlint:disable:this line_length
} }
} }
} }