Skip to content

Commit

Permalink
Rename TextLengthLimits to TextLengthLimit
Browse files Browse the repository at this point in the history
  • Loading branch information
otaviocc committed Mar 8, 2024
1 parent 7031d1c commit a60196c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/views/MicropostViewModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export enum SubmitButtonStyle {
Enabled
}

enum TextLengthLimits {
enum TextLengthLimit {
MinLength = 0,
MaxLength = 300
}
Expand Down Expand Up @@ -135,8 +135,8 @@ export class MicropostViewModel {
// Private

private publishButtonStyle() {
const isContentInvalid = this.plainTextContent.length <= TextLengthLimits.MinLength ||
this.plainTextContent.length > TextLengthLimits.MaxLength;
const isContentInvalid = this.plainTextContent.length <= TextLengthLimit.MinLength ||
this.plainTextContent.length > TextLengthLimit.MaxLength;

if (isContentInvalid) {
this.delegate?.publishUpdateSubmitButton(SubmitButtonStyle.Disabled);
Expand Down

0 comments on commit a60196c

Please sign in to comment.