Skip to content

Commit 705f643

Browse files
authored
Use index for sequence number on DeletePost action (#377)
1 parent cd77b22 commit 705f643

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Actions/DeletePost.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ protected function transact()
4747
}
4848

4949
// Update sequence numbers for all of the thread's posts
50-
$this->post->thread->posts->each(function ($p) {
51-
$p->updateWithoutTouch(['sequence' => $p->getSequenceNumber()]);
50+
$this->post->thread->posts->each(function ($p, $i) {
51+
$p->updateWithoutTouch(['sequence' => $i + 1]);
5252
});
5353

5454
return $this->post;

0 commit comments

Comments
 (0)