Skip to content

Commit

Permalink
[MDCProgressView] Execute completion block when setHidden:animated:co…
Browse files Browse the repository at this point in the history
…mpletion is called sequentially (#787)

* [MDCInkView] cancelAllAnimationsAnimated should support disabling animation

* Call completion block immediately rather than storing as a property.

* Add nil check for completion block
  • Loading branch information
jgunaratne committed Oct 24, 2016
1 parent 35362fe commit 45c0b06
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion components/ProgressView/src/MDCProgressView.m
Expand Up @@ -156,8 +156,12 @@ - (void)setHidden:(BOOL)hidden {
- (void)setHidden:(BOOL)hidden
animated:(BOOL)animated
completion:(void (^__nullable)(BOOL finished))completion {
if (hidden == self.hidden)
if (hidden == self.hidden) {
if (completion) {
completion(YES);
}
return;
}

void (^animations)(void);

Expand Down

0 comments on commit 45c0b06

Please sign in to comment.