From: Roland Häder Date: Wed, 26 Oct 2022 15:55:52 +0000 (+0200) Subject: Used `$this->isThreaded()` instead as suggested by @MrPetovan X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=03e09627e4f2f59e685e84e237bd65bfff45be96;p=friendica.git Used `$this->isThreaded()` instead as suggested by @MrPetovan --- diff --git a/src/Object/Post.php b/src/Object/Post.php index 7467e4ffc7..ddbc1a7368 100644 --- a/src/Object/Post.php +++ b/src/Object/Post.php @@ -587,16 +587,10 @@ class Post // Copy values/set defaults $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['private'] = $item['private']; + $result['toplevel'] = ($this->isToplevel() ? 'toplevel_item' : ''); + $result['flatten'] = !$this->isThreaded(); + $result['threaded'] = $this->isThreaded(); return $result; }