Skip to content

Commit

Permalink
修复一个loadingReq和Req同时使用且请求过程中view发生变化导致没有重新处理Req的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
lingtonke committed Mar 26, 2018
1 parent 1dcfb5f commit 2cf26b7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions LKImageKit/Core/Class/LKImageView.m
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ - (void)handleRequestFinish:(LKImageRequest *)request image:(UIImage *)image isF

if (!CGSizeEqualToSize(self.oldSize, self.size)&&image.lk_isScaled)
{
[request reset];
[self layoutAndLoad];
return;
}
Expand All @@ -217,6 +218,7 @@ - (void)handleRequestFinish:(LKImageRequest *)request image:(UIImage *)image isF
{
if (request.error.code == LKImageErrorCodeCancel)
{
[request reset];
[self layoutAndLoad];
}
else
Expand Down

0 comments on commit 2cf26b7

Please sign in to comment.