-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add multi-reply feature #2378
base: main
Are you sure you want to change the base?
Add multi-reply feature #2378
Conversation
Co-authored-by: Edward Jones <[email protected]>
This reverts commit 8e2b16a.
# Posting a new multi reply, go back to unread | ||
redirect_to post_path(params[:reply][:post_id], page: :unread, anchor: :unread) | ||
end | ||
return |
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.
Avoid too many return
statements within this method.
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.
I tried reducing them as much as I could but I don't think I can do better than what I currently have.
This comment was marked as resolved.
This comment was marked as resolved.
Co-authored-by: Edward Jones <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
return | ||
elsif params[:button_discard_multi_reply] | ||
flash[:success] = "Replies discarded." | ||
if editing_multi_reply? |
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.
Avoid deeply nested control flow statements.
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.
My brother in Christ if you have a better suggestion I am all ears
This feature allows the user to post multiple replies all at once, or to edit an existing reply and turn it into multiple replies in-place (to, effectively, "split" it).