Used $this->isThreaded() instead as suggested by @MrPetovan

This commit is contained in:
Roland Häder 2022-10-26 17:55:52 +02:00
parent 3c50d5b70f
commit 03e09627e4
No known key found for this signature in database
GPG key ID: C82EDE5DDFA0BA77

View file

@ -589,14 +589,8 @@ class Post
$result['total_comments_num'] = $this->isToplevel() ? $total_children : 0;
$result['private'] = $item['private'];
$result['toplevel'] = ($this->isToplevel() ? 'toplevel_item' : '');
$result['flatten'] = false;
$result['threaded'] = false;
if ($this->isThreaded()) {
$result['threaded'] = true;
} else {
$result['flatten'] = true;
}
$result['flatten'] = !$this->isThreaded();
$result['threaded'] = $this->isThreaded();
return $result;
}