UX: Don't display group messages link for group with no messages. (#14453)
This commit is contained in:
parent
7bc0700930
commit
9998090e5b
|
@ -87,12 +87,16 @@ export default Controller.extend({
|
|||
return defaultTabs;
|
||||
},
|
||||
|
||||
@discourseComputed("model.is_group_user")
|
||||
showMessages(isGroupUser) {
|
||||
@discourseComputed("model.has_messages", "model.is_group_user")
|
||||
showMessages(hasMessages, isGroupUser) {
|
||||
if (!this.siteSettings.enable_personal_messages) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!hasMessages) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return isGroupUser || (this.currentUser && this.currentUser.admin);
|
||||
},
|
||||
|
||||
|
|
|
@ -1317,6 +1317,7 @@ export default {
|
|||
user_count: 8,
|
||||
alias_level: 99,
|
||||
visible: true,
|
||||
has_messages: true,
|
||||
public_admission: true,
|
||||
public_exit: false,
|
||||
flair_url: "fa-adjust",
|
||||
|
|
Loading…
Reference in New Issue