Make adjustments based on the review

Co-authored-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
pull/39236/head
Hamid Dehnavi 2 years ago committed by Faraz Samapoor
parent 878288004e
commit 92b75bc798
  1. 3
      apps/comments/lib/Activity/Listener.php
  2. 3
      apps/comments/lib/Activity/Provider.php
  3. 3
      apps/comments/lib/Controller/NotificationsController.php
  4. 15
      apps/comments/lib/Search/Result.php

@ -35,9 +35,6 @@ use OCP\IUserSession;
use OCP\Share\IShareHelper;
class Listener {
/**
* Listener constructor.
*/
public function __construct(
protected IManager $activityManager,
protected IUserSession $session,

@ -39,7 +39,8 @@ class Provider implements IProvider {
public function __construct(
protected IFactory $languageFactory,
protected IURLGenerator $url, protected ICommentsManager $commentsManager,
protected IURLGenerator $url,
protected ICommentsManager $commentsManager,
protected IUserManager $userManager,
protected IManager $activityManager,
) {

@ -43,9 +43,6 @@ use OCP\Notification\IManager;
*/
#[IgnoreOpenAPI]
class NotificationsController extends Controller {
/**
* NotificationsController constructor.
*/
public function __construct(
string $appName,
IRequest $request,

@ -39,19 +39,23 @@ class Result extends BaseResult {
/**
* @deprecated 20.0.0
*/
public string $comment;
public $comment;
/**
* @deprecated 20.0.0
*/
public string $authorId;
public $authorId;
/**
* @deprecated 20.0.0
*/
public string $path;
public string $authorName;
/**
* @deprecated 20.0.0
*/
public string $fileName;
public $path;
/**
* @deprecated 20.0.0
*/
public $fileName;
/**
* @throws NotFoundException
@ -60,7 +64,7 @@ class Result extends BaseResult {
public function __construct(
string $search,
IComment $comment,
public string $authorName,
string $authorName,
string $path,
) {
parent::__construct(
@ -71,6 +75,7 @@ class Result extends BaseResult {
$this->comment = $this->getRelevantMessagePart($comment->getMessage(), $search);
$this->authorId = $comment->getActorId();
$this->authorName = $authorName;
$this->fileName = basename($path);
$this->path = $this->getVisiblePath($path);
}

Loading…
Cancel
Save