_observeFunctionDescriptorChange()

in submit-rules/gr-simple-submit-rules-label-config.js [80:98]


  _observeFunctionDescriptorChange(negativeBlocks, maxVoteRequired) {
    if (this._labelConfig === undefined) {
      return;
    }
    if (this._updatingFunction) {
      return;
    }
    this._updatingFunction = true;
    let fName = '';

    if (maxVoteRequired) {
      fName = negativeBlocks ? 'MaxWithBlock' : 'MaxNoBlock';
    } else {
      fName = negativeBlocks ? 'AnyWithBlock' : 'NoBlock';
    }
    this.set('_labelConfig.function', fName);

    this._updatingFunction = false;
  }