-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds Duplicate/Copy post functionality #15460
Changes from all commits
8076c88
347f62a
cae7b9f
b22a7af
f4e031d
8a56d86
f1a483b
2478d02
ed48e78
080cf36
e0ac71f
e9cc983
f1be727
2e78852
826fedd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ class PostCardStatusViewModel: NSObject { | |
case more | ||
case publish | ||
case stats | ||
case duplicate | ||
case moveToDraft | ||
case trash | ||
case cancelAutoUpload | ||
|
@@ -181,6 +182,10 @@ class PostCardStatusViewModel: NSObject { | |
buttons.append(.share) | ||
} | ||
|
||
if post.status == .publish || post.status == .draft { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure if it's already been discussed, but do we want to consider other statuses here (e.g. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought of it but I couldn't find any other condition that should prevent the user from copying the post. I used the same approach on Android There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For this, I mean the cases that allow the user to duplicate the post. I don't think it's a blocker, especially since we already have matching behavior on Android, and maybe we can consider other cases for a future iteration. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I agree @mkevins 👍 I'll merge this and reconsider in a next iteration. |
||
buttons.append(.duplicate) | ||
} | ||
|
||
if post.status != .draft { | ||
buttons.append(.moveToDraft) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOTE: I need to move this to the next release if this is not finished for
16.4