mirror of
https://github.com/humhub/humhub.git
synced 2025-01-17 22:28:51 +01:00
Enh #5280: Allow to set the number of contents from which "Show {i} more." appears in the stream (#5288)
This commit is contained in:
parent
c5d009a06b
commit
569651f104
@ -20,3 +20,4 @@
|
||||
- Enh #5005: Possibility to invite a registered user to a space by email
|
||||
- Enh #3546: Sign in back from impersonate mode
|
||||
- Fix #5282: On account creation, registration form has HTML tag set with English language
|
||||
- Enh #5280: Allow to set the number of contents from which "Show {i} more." appears in the stream
|
||||
|
@ -32,6 +32,11 @@ class Module extends \humhub\components\Module
|
||||
*/
|
||||
public $defaultStreamSuppressQueryIgnore = [\humhub\modules\post\models\Post::class, \humhub\modules\activity\models\Activity::class];
|
||||
|
||||
/**
|
||||
* @var int number of contents from which "Show more" appears in the stream
|
||||
*/
|
||||
public $streamSuppressLimit = 2;
|
||||
|
||||
/**
|
||||
* @var boolean show contents of deactivated users in stream
|
||||
*/
|
||||
|
@ -85,7 +85,10 @@ class StreamSuppressQuery extends StreamQuery
|
||||
*/
|
||||
protected function isSuppressionActive()
|
||||
{
|
||||
return !($this->preventSuppression || $this->limit < 3 || $this->isSingleContentQuery());
|
||||
/* @var $streamModule \humhub\modules\stream\Module */
|
||||
$streamModule = Yii::$app->getModule('stream');
|
||||
|
||||
return !($this->preventSuppression || $this->limit <= $streamModule->streamSuppressLimit || $this->isSingleContentQuery());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user