From f9db27ea41c7e3f5002be57bbf8fd5bf30f7346e Mon Sep 17 00:00:00 2001 From: Frank <472730949@qq.com> Date: Tue, 30 Nov 2021 15:00:33 +0800 Subject: [PATCH] Fix/duplicated async method (#1560) * Removed another one duplicated async method --- MJRefresh.podspec | 2 +- MJRefresh/Base/MJRefreshComponent.m | 20 +++++++++----------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/MJRefresh.podspec b/MJRefresh.podspec index aa046a73..b6eb0cb0 100644 --- a/MJRefresh.podspec +++ b/MJRefresh.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'MJRefresh' - s.version = '3.7.4' + s.version = '3.7.5' s.summary = 'An easy way to use pull-to-refresh' s.homepage = 'https://github.com/CoderMJLee/MJRefresh' s.license = 'MIT' diff --git a/MJRefresh/Base/MJRefreshComponent.m b/MJRefresh/Base/MJRefreshComponent.m index 27328fc5..785df18a 100644 --- a/MJRefresh/Base/MJRefreshComponent.m +++ b/MJRefresh/Base/MJRefreshComponent.m @@ -237,17 +237,15 @@ - (void)setPullingPercent:(CGFloat)pullingPercent #pragma mark - 内部方法 - (void)executeRefreshingCallback { - MJRefreshDispatchAsyncOnMainQueue({ - if (self.refreshingBlock) { - self.refreshingBlock(); - } - if ([self.refreshingTarget respondsToSelector:self.refreshingAction]) { - MJRefreshMsgSend(MJRefreshMsgTarget(self.refreshingTarget), self.refreshingAction, self); - } - if (self.beginRefreshingCompletionBlock) { - self.beginRefreshingCompletionBlock(); - } - }) + if (self.refreshingBlock) { + self.refreshingBlock(); + } + if ([self.refreshingTarget respondsToSelector:self.refreshingAction]) { + MJRefreshMsgSend(MJRefreshMsgTarget(self.refreshingTarget), self.refreshingAction, self); + } + if (self.beginRefreshingCompletionBlock) { + self.beginRefreshingCompletionBlock(); + } } #pragma mark - 刷新动画时间控制