DEV: improve the code readability.

82c5a1d20f
This commit is contained in:
Vinoth Kannan 2019-09-06 01:27:29 +05:30
parent d78ed3159d
commit c1769b0ec5
2 changed files with 3 additions and 3 deletions

View File

@ -19,12 +19,12 @@ export default Ember.Component.extend({
@computed("model.visibility_level", "model.public_admission")
disableMembershipRequestSetting(visibility_level, publicAdmission) {
visibility_level = parseInt(visibility_level);
return ![0, 1].includes(visibility_level) || publicAdmission;
return publicAdmission || visibility_level > 1;
},
@computed("model.visibility_level", "model.allow_membership_requests")
disablePublicSetting(visibility_level, allowMembershipRequests) {
visibility_level = parseInt(visibility_level);
return ![0, 1].includes(visibility_level) || allowMembershipRequests;
return allowMembershipRequests || visibility_level > 1;
}
});

View File

@ -139,7 +139,7 @@ const Group = RestModel.extend({
@computed("visibility_level")
isPrivate(visibilityLevel) {
return ![0, 1].includes(visibilityLevel);
return visibility_level > 1;
},
@observes("isPrivate", "canEveryoneMention")