mirror of
https://github.com/writeas/writefreely-swiftui-multiplatform.git
synced 2024-11-15 01:11:02 +00:00
Remove redundant Post properties
This commit is contained in:
parent
05456ad501
commit
072e60c918
@ -8,12 +8,9 @@ enum PostStatus {
|
||||
}
|
||||
|
||||
class Post: Identifiable, ObservableObject {
|
||||
@Published var title: String
|
||||
@Published var body: String
|
||||
@Published var createdDate: Date
|
||||
@Published var wfPost: WFPost
|
||||
@Published var status: PostStatus
|
||||
@Published var collection: PostCollection
|
||||
@Published var wfPost: WFPost?
|
||||
|
||||
let id = UUID()
|
||||
|
||||
@ -24,9 +21,7 @@ class Post: Identifiable, ObservableObject {
|
||||
status: PostStatus = .draft,
|
||||
collection: PostCollection = draftsCollection
|
||||
) {
|
||||
self.title = title
|
||||
self.body = body
|
||||
self.createdDate = createdDate
|
||||
self.wfPost = WFPost(body: body, title: title, createdDate: createdDate)
|
||||
self.status = status
|
||||
self.collection = collection
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user