mirror of
https://github.com/flarum/core.git
synced 2025-08-08 17:36:38 +02:00
Rename discussion.readNumber
This commit is contained in:
@@ -34,17 +34,17 @@ class ReadDiscussion
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public $readNumber;
|
||||
public $lastReadPostNumber;
|
||||
|
||||
/**
|
||||
* @param int $discussionId The ID of the discussion to mark as read.
|
||||
* @param User $actor The user to mark the discussion as read for.
|
||||
* @param int $readNumber The number of the post to mark as read.
|
||||
* @param int $lastReadPostNumber The number of the post to mark as read.
|
||||
*/
|
||||
public function __construct($discussionId, User $actor, $readNumber)
|
||||
public function __construct($discussionId, User $actor, $lastReadPostNumber)
|
||||
{
|
||||
$this->discussionId = $discussionId;
|
||||
$this->actor = $actor;
|
||||
$this->readNumber = $readNumber;
|
||||
$this->lastReadPostNumber = $lastReadPostNumber;
|
||||
}
|
||||
}
|
||||
|
@@ -51,7 +51,7 @@ class ReadDiscussionHandler
|
||||
$discussion = $this->discussions->findOrFail($command->discussionId, $actor);
|
||||
|
||||
$state = $discussion->stateFor($actor);
|
||||
$state->read($command->readNumber);
|
||||
$state->read($command->lastReadPostNumber);
|
||||
|
||||
$this->events->dispatch(
|
||||
new UserDataSaving($state)
|
||||
|
Reference in New Issue
Block a user