Page Menu
Home
Musing Studio
Search
Configure Global Search
Log In
Files
F10669927
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
View Options
diff --git a/macOS/Navigation/ActivePostToolbarView.swift b/macOS/Navigation/ActivePostToolbarView.swift
index 58e223c..68b9d93 100644
--- a/macOS/Navigation/ActivePostToolbarView.swift
+++ b/macOS/Navigation/ActivePostToolbarView.swift
@@ -1,25 +1,25 @@
import SwiftUI
struct ActivePostToolbarView: View {
@EnvironmentObject var model: WriteFreelyModel
@ObservedObject var activePost: WFAPost
var body: some View {
HStack(spacing: 16) {
PostEditorStatusToolbarView(post: activePost)
HStack(spacing: 4) {
- Button(action: { publishPost(activePost) }, label: { Image(systemName: "paperplane") })
- .disabled(activePost.body.isEmpty || activePost.status == PostStatus.published.rawValue)
Button(action: {}, label: { Image(systemName: "square.and.arrow.up") })
.disabled(activePost.status == PostStatus.local.rawValue)
+ Button(action: { publishPost(activePost) }, label: { Image(systemName: "paperplane") })
+ .disabled(activePost.body.isEmpty || activePost.status == PostStatus.published.rawValue)
}
}
}
private func publishPost(_ post: WFAPost) {
DispatchQueue.main.async {
LocalStorageManager().saveContext()
model.publish(post: post)
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Fri, May 16, 6:27 PM (10 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3240352
Attached To
rWFSUI WriteFreely SwiftUI
Event Timeline
Log In to Comment