Skip to content
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

Fix: Show draft replies in the correct tree #396

Conversation

jakubbortlik
Copy link
Collaborator

Fixes #392.

@jakubbortlik jakubbortlik force-pushed the fix-draft-replies-to-comments-shown-as-draft-notes branch from 7b8ca98 to 5a62063 Compare October 12, 2024 15:00
local unlinked_draft_notes = List.new(state.DRAFT_NOTES):filter(function(note)
return not draft_notes.has_position(note)
local inline_draft_notes, unlinked_draft_notes = List.new(state.DRAFT_NOTES):partition(function(note)
if note.discussion_id == "" then
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small thing but since this is an early return, it's clearer in my opinion if you remove the else block. Meaning:

if some_cond then
   return some_result
end

-- Do other work

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, sure. It's indeed clearer. Fixed.

@harrisoncramer harrisoncramer merged commit b359b47 into harrisoncramer:develop Oct 13, 2024
6 checks passed
harrisoncramer added a commit that referenced this pull request Oct 13, 2024
fix: Error messages and run all tests (#381)
feat: Automatically open fold under cursor (#380)
fix: Discussion ID is not required (#383)
chore: Add more emojis (#384)
fix: Publish all drafts (#391)
fix: Make discussion tree buffers no-modifiable (#394)
fix: Incorrect warning about commits (#395)
fix: Show draft replies in the correct tree (#396)
fix: Cannot choose merge requests (#398)

---------

Co-authored-by: George Kontridze <[email protected]>
Co-authored-by: Jakub F. Bortlík <[email protected]>
@jakubbortlik jakubbortlik deleted the fix-draft-replies-to-comments-shown-as-draft-notes branch October 14, 2024 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants