Merge pull request #9272 from nextcloud/bugfix/noid/save-a-query-help-saving-the-world
Only query last comment info, when there is one
This commit is contained in:
commit
9b150001ff
|
@ -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 New Issue