Fix wrong empty profile stream message (#5877)

* Fix wrong empty profile stream message

* Update CHANGELOG.md

Co-authored-by: Lucas Bartholemy <luke-@users.noreply.github.com>
This commit is contained in:
Yuriy Bakhtin 2022-10-04 14:44:26 +03:00 committed by GitHub
parent 3209014db1
commit 634790c5ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 9 deletions

View File

@ -7,6 +7,7 @@ HumHub Changelog
- Fix #5856: Fix SMTPS Config Migration
- Fix #5854: Don't validate user language on approve
- Fix #5875: LDAP user creation broken without email address
- Fix #5877: Fix wrong empty profile stream message
- Fix #5874: Fix adding licence key after removing it from marketplace

View File

@ -672,7 +672,7 @@ humhub.module('stream.Stream', function (module, require, $) {
};
Stream.prototype.hasActiveFilters = function () {
return this.filter && this.filter.getActiveFilterCount({exclude: ['sort']}) > 0;
return this.filter && this.filter.getActiveFilterCount({exclude: ['sort', 'scope']}) > 0;
};
/**

View File

@ -50,14 +50,12 @@ class StreamViewer extends BaseStreamViewer
$this->messageStreamEmptyCss = 'placeholder-empty-stream';
}
if (empty($this->messageStreamEmpty)) {
if ($canCreatePost) {
$this->messageStreamEmpty = $this->contentContainer->is(Yii::$app->user->getIdentity())
? Yii::t('UserModule.profile', '<b>Your profile stream is still empty</b><br>Get started and post something...')
: Yii::t('UserModule.profile', '<b>This profile stream is still empty</b><br>Be the first and post something...');
} else {
$this->messageStreamEmpty = Yii::t('UserModule.profile', '<b>This profile stream is still empty!</b>');
}
if ($canCreatePost) {
$this->messageStreamEmpty = $this->contentContainer->is(Yii::$app->user->getIdentity())
? Yii::t('UserModule.profile', '<b>Your profile stream is still empty</b><br>Get started and post something...')
: Yii::t('UserModule.profile', '<b>This profile stream is still empty</b><br>Be the first and post something...');
} else {
$this->messageStreamEmpty = Yii::t('UserModule.profile', '<b>This profile stream is still empty!</b>');
}
}