Speed improvement
This commit is contained in:
parent
15119f6a59
commit
1493875ec9
1 changed files with 5 additions and 3 deletions
|
@ -714,13 +714,15 @@ function conversation_fetch_comments($thread_items, $pinned) {
|
||||||
$received = '';
|
$received = '';
|
||||||
|
|
||||||
while ($row = Item::fetch($thread_items)) {
|
while ($row = Item::fetch($thread_items)) {
|
||||||
if (($row['verb'] == Activity::ANNOUNCE) && ($row['thr-parent'] == $row['parent-uri'])
|
if (!empty($parentlines) && ($row['verb'] == Activity::ANNOUNCE)
|
||||||
&& ($row['received'] > $received) && Contact::isSharing($row['author-id'], $row['uid'])) {
|
&& ($row['thr-parent'] == $row['parent-uri']) && ($row['received'] > $received)
|
||||||
|
&& Contact::isSharing($row['author-id'], $row['uid'])) {
|
||||||
$direction = ['direction' => 3, 'title' => DI::l10n()->t('%s reshared this.', $row['author-name'])];
|
$direction = ['direction' => 3, 'title' => DI::l10n()->t('%s reshared this.', $row['author-name'])];
|
||||||
$received = $row['received'];
|
$received = $row['received'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($direction) && ($row['gravity'] == GRAVITY_COMMENT) && Contact::isSharing($row['author-id'], $row['uid'])) {
|
if (!empty($parentlines) && empty($direction) && ($row['gravity'] == GRAVITY_COMMENT)
|
||||||
|
&& Contact::isSharing($row['author-id'], $row['uid'])) {
|
||||||
$direction = ['direction' => 2, 'title' => DI::l10n()->t('%s commented this.', $row['author-name'])];
|
$direction = ['direction' => 2, 'title' => DI::l10n()->t('%s commented this.', $row['author-name'])];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue