apps/sms/js/thread_ui.js
// returns true when the limit is over the segment limit
returns true when the limit is over the segment limit
returns true when the limit is over the segment limit
function thui_updateSmsSegmentLimit() {
    if (!(this._mozMobileMessage &&
          this._mozMobileMessage.getSegmentInfoForText)) {
      return false;
    }
    var value = Compose.getText();
    var kMaxConcatenatedMessages = 10;
    var smsInfo = this._mozMobileMessage.getSegmentInfoForText(value);
    var segments = smsInfo.segments;
    var availableChars = smsInfo.charsAvailableInLastSegment;
    this.sendButton.dataset.counter = availableChars + '/' + segments;
    if (segments && (segments > 1 || availableChars <= 10)) {
      this.sendButton.classList.add('has-counter');
    } else {
      this.sendButton.classList.remove('has-counter');
    }
    return segments > kMaxConcatenatedMessages;
  }
function thui_updateSmsSegmentLimit ( ) { if ( ! ( this . _mozMobileMessage && this . _mozMobileMessage . getSegmentInfoForText ) ) { return false ; } var value = Compose . getText ( ) ; var kMaxConcatenatedMessages = 10 ; var smsInfo = this . _mozMobileMessage . getSegmentInfoForText ( value ) ; var segments = smsInfo . segments ; var availableChars = smsInfo . charsAvailableInLastSegment ; this . sendButton . dataset . counter = availableChars + '/' + segments ; if ( segments && ( segments > 1 || availableChars <= 10 ) ) { this . sendButton . classList . add ( 'has-counter' ) ; } else { this . sendButton . classList . remove ( 'has-counter' ) ; } return segments > kMaxConcatenatedMessages ; }
returns true when the limit is over the segment limit
returns true when the limit is over the segment limit
// We set maximum concatenated number of our SMS app to 10 based on: // https://bugzilla.mozilla.org/show_bug.cgi?id=813686#c0 // Use backend api for precise sms segmetation information. // in MMS mode, the counter value isn't used anyway, so we can update this // if we are going to force MMS, this is true anyway, so adding has-counter // again doesn't hurt us.