File tree 1 file changed +7
-1
lines changed 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,8 @@ export function initRepoIssueCommentDelete() {
162
162
const response = await POST ( $this . data ( 'url' ) ) ;
163
163
if ( ! response . ok ) throw new Error ( 'Failed to delete comment' ) ;
164
164
const $conversationHolder = $this . closest ( '.conversation-holder' ) ;
165
-
165
+ const $parentTimelineItem = $this . closest ( '.timeline-item' ) ;
166
+ const $parentTimelineGroup = $this . closest ( '.timeline-item-group' ) ;
166
167
// Check if this was a pending comment.
167
168
if ( $conversationHolder . find ( '.pending-label' ) . length ) {
168
169
const $counter = $ ( '#review-box .review-comments-counter' ) ;
@@ -185,6 +186,11 @@ export function initRepoIssueCommentDelete() {
185
186
}
186
187
$conversationHolder . remove ( ) ;
187
188
}
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
+ }
188
194
} catch ( error ) {
189
195
console . error ( error ) ;
190
196
}
You can’t perform that action at this time.
0 commit comments