mirror of
https://github.com/nextcloud/server.git
synced 2026-04-21 06:08:46 -04:00
Only query last comment info, when there is one
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
3ff041f86d
commit
446efa4625
1 changed files with 2 additions and 2 deletions
|
|
@ -407,11 +407,11 @@ class Manager implements ICommentsManager {
|
|||
$query->setMaxResults($limit);
|
||||
}
|
||||
|
||||
$lastKnownComment = $this->getLastKnownComment(
|
||||
$lastKnownComment = $lastKnownCommentId > 0 ? $this->getLastKnownComment(
|
||||
$objectType,
|
||||
$objectId,
|
||||
$lastKnownCommentId
|
||||
);
|
||||
) : null;
|
||||
if ($lastKnownComment instanceof IComment) {
|
||||
$lastKnownCommentDateTime = $lastKnownComment->getCreationDateTime();
|
||||
if ($sortDirection === 'desc') {
|
||||
|
|
|
|||
Loading…
Reference in a new issue