infinite loop crash fix in setting up bottom progress bar

This commit is contained in:
Khan, Arshad 2021-02-17 17:57:19 +05:30
parent d47bb1ced1
commit d0326a9b30

View File

@ -824,14 +824,14 @@ CGFloat const PanelAnimationDuration = 0.2;
[MVMCoreDispatchUtility performBlockOnMainThread:^{
if (self.bottomProgressBarHeightConstraint.constant != PaddingOne) {
self.bottomProgressBarHeightConstraint.constant = PaddingOne;
[self.bottomProgressBar.superview layoutIfNeeded];
[self.bottomProgressBar updateConstraintsIfNeeded];
}
if (progress > 0.05) {
self.bottomProgressBar.progress = progress;
} else {
self.bottomProgressBarHeightConstraint.constant = 0;
[self.bottomProgressBar.superview layoutIfNeeded];
[self.bottomProgressBar updateConstraintsIfNeeded];
}
}];
}