PushRules settings: Applied review remarks (2/2)

This commit is contained in:
manuroe 2016-01-18 18:24:53 +01:00
parent fdf5b0a4fc
commit 6182c983ab

View File

@ -331,9 +331,9 @@ module.exports = React.createClass({
} }
}, },
// Determine whether a rule is in the PushRuleVectorState.ON category or in PushRuleVectorState.LOUD // Determine whether a content rule is in the PushRuleVectorState.ON category or in PushRuleVectorState.LOUD
// regardless of its enabled state. // regardless of its enabled state. Returns undefined if it does not match these categories.
_pushRuleVectorStateKind: function(rule) { _contentRuleVectorStateKind: function(rule) {
var stateKind; var stateKind;
// Count tweaks to determine if it is a ON or LOUD rule // Count tweaks to determine if it is a ON or LOUD rule
@ -533,7 +533,7 @@ module.exports = React.createClass({
// when creating the new rule. // when creating the new rule.
// Thus, this new rule will join the 'vectorContentRules' set. // Thus, this new rule will join the 'vectorContentRules' set.
if (self.state.vectorContentRules.rules.length) { if (self.state.vectorContentRules.rules.length) {
pushRuleVectorStateKind = self._pushRuleVectorStateKind(self.state.vectorContentRules.rules[0]); pushRuleVectorStateKind = self._contentRuleVectorStateKind(self.state.vectorContentRules.rules[0]);
} }
else { else {
// ON is default // ON is default
@ -657,7 +657,7 @@ module.exports = React.createClass({
vectorOverridingRules[r.rule_id] = r; vectorOverridingRules[r.rule_id] = r;
} }
else if (kind === 'content') { else if (kind === 'content') {
switch (self._pushRuleVectorStateKind(r)) { switch (self._contentRuleVectorStateKind(r)) {
case PushRuleVectorState.ON: case PushRuleVectorState.ON:
if (r.enabled) { if (r.enabled) {
contentRules.on.push(r); contentRules.on.push(r);