File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Sources/TGCardViewController Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -1252,7 +1252,7 @@ extension TGCardViewController {
1252
1252
topCardView? . grabHandles. forEach {
1253
1253
updateCardHandleAccessibility ( handle: $0, position: position)
1254
1254
}
1255
-
1255
+
1256
1256
let mapIsInteractive = cardIsNextToMap ( in: traitCollection) || position != . extended
1257
1257
mapViewController. isUserInteractionEnabled = mapIsInteractive
1258
1258
topFloatingViewWrapper. isUserInteractionEnabled = mapIsInteractive
@@ -1454,7 +1454,8 @@ extension TGCardViewController {
1454
1454
mode == . floating,
1455
1455
let scrollView = recogniser. view as? UIScrollView ,
1456
1456
scrollView == topCardView? . contentScrollView,
1457
- panner. isEnabled
1457
+ panner. isEnabled,
1458
+ scrollView. refreshControl == nil
1458
1459
else { return }
1459
1460
1460
1461
let negativity = scrollView. contentOffset. y
@@ -1993,6 +1994,14 @@ extension TGCardViewController: UIGestureRecognizerDelegate {
1993
1994
case . collapsed, . peaking: return false
1994
1995
}
1995
1996
1997
+ } else if gestureRecognizer == panner {
1998
+ // Don't allow panning if the card is extended and there's a refresh
1999
+ // control
2000
+ guard let innerScroll = topCardView? . contentScrollView else { return true }
2001
+ return cardWrapperDesiredTopConstraint. constant > extendedMinY
2002
+ || innerScroll. refreshControl == nil
2003
+ || touch. location ( in: innerScroll) . y <= 0
2004
+
1996
2005
} else {
1997
2006
return true
1998
2007
}
You can’t perform that action at this time.
0 commit comments