File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,8 @@ export function initRepoIssueCommentDelete() {
162162 _csrf : csrfToken ,
163163 } ) . done ( ( ) => {
164164 const $conversationHolder = $this . closest ( '.conversation-holder' ) ;
165-
165+ const $parentTimelineItem = $this . closest ( '.timeline-item' ) ;
166+ const $parentTimelineGroup = $this . closest ( '.timeline-item-group' ) ;
166167 // Check if this was a pending comment.
167168 if ( $conversationHolder . find ( '.pending-label' ) . length ) {
168169 const $counter = $ ( '#review-box .review-comments-counter' ) ;
@@ -185,6 +186,11 @@ export function initRepoIssueCommentDelete() {
185186 }
186187 $conversationHolder . remove ( ) ;
187188 }
189+ // Check if there is no review content, move the time avatar upward to avoid overlapping the content below.
190+ if ( ! $parentTimelineGroup . find ( '.timeline-item.comment' ) . length && ! $parentTimelineItem . find ( '.conversation-holder' ) . length ) {
191+ const $timelineAvatar = $parentTimelineGroup . find ( '.timeline-avatar' ) ;
192+ $timelineAvatar . removeClass ( 'timeline-avatar-offset' ) ;
193+ }
188194 } ) ;
189195 }
190196 return false ;
You can’t perform that action at this time.
0 commit comments