mirror of
https://github.com/go-gitea/gitea
synced 2024-12-25 10:04:27 +00:00
backport #29951
This commit is contained in:
parent
58a0ba711d
commit
3ff3c5ba78
@ -162,7 +162,8 @@ export function initRepoIssueCommentDelete() {
|
|||||||
_csrf: csrfToken,
|
_csrf: csrfToken,
|
||||||
}).done(() => {
|
}).done(() => {
|
||||||
const $conversationHolder = $this.closest('.conversation-holder');
|
const $conversationHolder = $this.closest('.conversation-holder');
|
||||||
|
const $parentTimelineItem = $this.closest('.timeline-item');
|
||||||
|
const $parentTimelineGroup = $this.closest('.timeline-item-group');
|
||||||
// Check if this was a pending comment.
|
// Check if this was a pending comment.
|
||||||
if ($conversationHolder.find('.pending-label').length) {
|
if ($conversationHolder.find('.pending-label').length) {
|
||||||
const $counter = $('#review-box .review-comments-counter');
|
const $counter = $('#review-box .review-comments-counter');
|
||||||
@ -185,6 +186,11 @@ export function initRepoIssueCommentDelete() {
|
|||||||
}
|
}
|
||||||
$conversationHolder.remove();
|
$conversationHolder.remove();
|
||||||
}
|
}
|
||||||
|
// Check if there is no review content, move the time avatar upward to avoid overlapping the content below.
|
||||||
|
if (!$parentTimelineGroup.find('.timeline-item.comment').length && !$parentTimelineItem.find('.conversation-holder').length) {
|
||||||
|
const $timelineAvatar = $parentTimelineGroup.find('.timeline-avatar');
|
||||||
|
$timelineAvatar.removeClass('timeline-avatar-offset');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user