More notifications fixes
Fix another thing I broke during the refactor
This commit is contained in:
parent
0f0c3d0ca1
commit
5450223cc7
|
@ -497,8 +497,8 @@ module.exports = React.createClass({
|
||||||
// Translate the rule actions and its enabled value into vector state
|
// Translate the rule actions and its enabled value into vector state
|
||||||
var vectorState;
|
var vectorState;
|
||||||
if (rule) {
|
if (rule) {
|
||||||
for (var stateKey in PushRuleVectorState) {
|
for (var stateKey in PushRuleVectorState.states) {
|
||||||
var state = PushRuleVectorState[stateKey];
|
var state = PushRuleVectorState.states[stateKey];
|
||||||
var vectorStateToActions = ruleDefinition.vectorStateToActions[state];
|
var vectorStateToActions = ruleDefinition.vectorStateToActions[state];
|
||||||
|
|
||||||
if (!vectorStateToActions) {
|
if (!vectorStateToActions) {
|
||||||
|
|
|
@ -18,12 +18,7 @@ limitations under the License.
|
||||||
|
|
||||||
var StandardActions = require('./StandardActions');
|
var StandardActions = require('./StandardActions');
|
||||||
|
|
||||||
/**
|
var states = {
|
||||||
* Enum for state of a push rule as defined by the Vector UI.
|
|
||||||
* @readonly
|
|
||||||
* @enum {string}
|
|
||||||
*/
|
|
||||||
module.exports = {
|
|
||||||
/** The push rule is disabled */
|
/** The push rule is disabled */
|
||||||
OFF: "off",
|
OFF: "off",
|
||||||
|
|
||||||
|
@ -33,6 +28,16 @@ module.exports = {
|
||||||
/** The user will receive push notification for this rule with sound and
|
/** The user will receive push notification for this rule with sound and
|
||||||
highlight if this is legitimate */
|
highlight if this is legitimate */
|
||||||
LOUD: "loud",
|
LOUD: "loud",
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
/**
|
||||||
|
* Enum for state of a push rule as defined by the Vector UI.
|
||||||
|
* @readonly
|
||||||
|
* @enum {string}
|
||||||
|
*/
|
||||||
|
states: states,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert a PushRuleVectorState to a list of actions
|
* Convert a PushRuleVectorState to a list of actions
|
||||||
|
@ -78,3 +83,7 @@ module.exports = {
|
||||||
return stateKind;
|
return stateKind;
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
for (var k in states) {
|
||||||
|
module.exports[k] = states[k];
|
||||||
|
};
|
||||||
|
|
Loading…
Reference in New Issue