Release (#415)
fix: parse dates without timezone offset (#404) fix: enable replying if tree is in a different tab (#407) fix: wrong get url (#413) fix: Restore cursor when updating from outside of tree (#406) --------- Co-authored-by: Jakub F. Bortlík <jakub.bortlik@proton.me> Co-authored-by: Oscar <oscar.creator13@gmail.com>
This commit is contained in:
committed by
GitHub
parent
341d56a1cb
commit
30daecfb60
@@ -41,13 +41,7 @@ local confirm_create_comment = function(text, visual_range, unlinked, discussion
|
||||
local body = { discussion_id = discussion_id, reply = text, draft = is_draft }
|
||||
job.run_job("/mr/reply", "POST", body, function()
|
||||
u.notify("Sent reply!", vim.log.levels.INFO)
|
||||
if is_draft then
|
||||
draft_notes.load_draft_notes(function()
|
||||
discussions.rebuild_view(unlinked)
|
||||
end)
|
||||
else
|
||||
discussions.rebuild_view(unlinked)
|
||||
end
|
||||
discussions.rebuild_view(unlinked)
|
||||
end)
|
||||
return
|
||||
end
|
||||
@@ -69,8 +63,6 @@ local confirm_create_comment = function(text, visual_range, unlinked, discussion
|
||||
return
|
||||
end
|
||||
|
||||
vim.print("Here: ", unlinked, discussion_id)
|
||||
|
||||
local reviewer_data = reviewer.get_reviewer_data()
|
||||
if reviewer_data == nil then
|
||||
u.notify("Error getting reviewer data", vim.log.levels.ERROR)
|
||||
@@ -102,7 +94,7 @@ local confirm_create_comment = function(text, visual_range, unlinked, discussion
|
||||
job.run_job("/mr/draft_notes/", "POST", body, function()
|
||||
u.notify("Draft reply created!", vim.log.levels.INFO)
|
||||
draft_notes.load_draft_notes(function()
|
||||
discussions.rebuild_view(false, true)
|
||||
discussions.rebuild_view(unlinked)
|
||||
end)
|
||||
end)
|
||||
return
|
||||
@@ -166,7 +158,7 @@ end
|
||||
---@param opts LayoutOpts
|
||||
---@return NuiLayout|nil
|
||||
M.create_comment_layout = function(opts)
|
||||
if opts.unlinked ~= true then
|
||||
if opts.unlinked ~= true and opts.discussion_id == nil then
|
||||
-- Check that diffview is initialized
|
||||
if reviewer.tabnr == nil then
|
||||
u.notify("Reviewer must be initialized first", vim.log.levels.ERROR)
|
||||
|
||||
Reference in New Issue
Block a user