Browse Source

Fixed a bug that AutoStateFooter(Normal) couldn't call refresh method by tapping state label. It shouldn't be influenced by dragging logic. (#1529)

Frank 4 years ago
parent
commit
731c090e17
1 changed files with 15 additions and 1 deletions
  1. 15 1
      MJRefresh/Custom/Footer/Auto/MJRefreshAutoStateFooter.m

+ 15 - 1
MJRefresh/Custom/Footer/Auto/MJRefreshAutoStateFooter.m

@@ -8,6 +8,20 @@
 
 #import "MJRefreshAutoStateFooter.h"
 
+@interface MJRefreshAutoFooter (TapTriggerFix)
+
+- (void)beginRefreshingWithoutValidation;
+@end
+
+
+@implementation MJRefreshAutoFooter (TapTriggerFix)
+
+- (void)beginRefreshingWithoutValidation {
+    [super beginRefreshing];
+}
+
+@end
+
 @interface MJRefreshAutoStateFooter()
 {
     /** 显示刷新状态的label */
@@ -48,7 +62,7 @@ - (instancetype)setTitle:(NSString *)title forState:(MJRefreshState)state
 - (void)stateLabelClick
 {
     if (self.state == MJRefreshStateIdle) {
-        [self beginRefreshing];
+        [super beginRefreshingWithoutValidation];
     }
 }