Skip to content

Commit

Permalink
Merge pull request #11 from DmitryTsepelev/cleanup
Browse files Browse the repository at this point in the history
Avoiding extra conditions
  • Loading branch information
michaelkamprath committed Feb 2, 2013
2 parents d6f5c46 + 6cbfdd3 commit 9caa12e
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions Views/MKNumberBadgeView/MKNumberBadgeView.m
Original file line number Diff line number Diff line change
Expand Up @@ -273,14 +273,7 @@ - (void)setValue:(NSUInteger)inValue
{
_value = inValue;

if (self.hideWhenZero == YES && _value == 0)
{
self.hidden = YES;
}
else
{
self.hidden = NO;
}
self.hidden = self.hideWhenZero && _value == 0;

[self setNeedsDisplay];
}
Expand Down

0 comments on commit 9caa12e

Please sign in to comment.