Merge pull request #175 from writeas/update-createdDate-on-publish

Update createdDate to the current timestamp when publishing new post
This commit is contained in:
Angelo Stavrow 2021-02-11 10:31:19 -05:00 committed by GitHub
commit c8707ff61f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -97,7 +97,7 @@ extension WriteFreelyModel {
appearance: post.appearance,
language: post.language,
rtl: post.rtl,
createdDate: post.createdDate
createdDate: post.status == PostStatus.local.rawValue ? Date() : post.createdDate
)
if let existingPostId = post.postId {