Skip to content

Commit

Permalink
Merge pull request #57 from juliensaad/master
Browse files Browse the repository at this point in the history
Closes #56. Fix completion block called twice when opening popup while presenting.
  • Loading branch information
LeoNatan committed Apr 9, 2016
2 parents 50121d1 + ca25bda commit 0684387
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ - (void)presentPopupBarAnimated:(BOOL)animated openPopup:(BOOL)open completion:(
}
} completion:^(BOOL finished)
{
if(completionBlock != nil)
if(completionBlock != nil && !open)
{
completionBlock();
}
Expand All @@ -658,8 +658,7 @@ - (void)presentPopupBarAnimated:(BOOL)animated openPopup:(BOOL)open completion:(
{
[self openPopupAnimated:animated completion:completionBlock];
}

if(completionBlock != nil)
else if(completionBlock != nil)
{
completionBlock();
}
Expand Down

0 comments on commit 0684387

Please sign in to comment.