1
0
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:
Toby Zerner
2018-08-24 20:53:28 +09:30
parent 9074f7e592
commit a7ffed6778
7 changed files with 13 additions and 13 deletions

View File

@@ -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;
}
}

View File

@@ -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)