fix(mobile): release initial scroll target after dragging (#10483)
This commit is contained in:
1 parent
b248f5ad56
commit
c0d4e95c0d
2 files changed
+7
-7
No files matched your search
@@ -570,7 +570,7 @@ index b3c5a306b293f797a8b338adfca3060c0f6db22b..ddca4bcd8a5dc5863cb65e03b6cfac00
|
||||
- const shouldKeepEndTargetAlive = isRetargetableBottomAlignedInitialScrollTarget(initialScroll) && peek$(ctx, "isAtEnd");
|
||||
+ const endTargetDistanceFromEnd = getContentSize(ctx) - state.scroll - state.scrollLength - getContentInsetEnd(ctx);
|
||||
+ const isNearEndForInsetList = getContentInsetStartAdjustment(ctx) > 0 && Number.isFinite(endTargetDistanceFromEnd) && endTargetDistanceFromEnd <= state.scrollLength * 0.5;
|
||||
+ const shouldKeepEndTargetAlive = isRetargetableBottomAlignedInitialScrollTarget(initialScroll) && (peek$(ctx, "isAtEnd") || isNearEndForInsetList);
|
||||
+ const shouldKeepEndTargetAlive = isRetargetableBottomAlignedInitialScrollTarget(initialScroll) && (peek$(ctx, "isAtEnd") || !state.didUserDrag && isNearEndForInsetList);
|
||||
if (!shouldKeepEndTargetAlive) {
|
||||
if (shouldPreserveInitialScrollForFooterLayout(initialScroll)) {
|
||||
clearPendingInitialScrollFooterLayout(ctx, {
|
||||
@@ -1129,7 +1129,7 @@ index 40e87cda8c9bc79a889e5542f29af429a24b24d4..b8c6faf0be51cbda3e8af01f290dbe97
|
||||
- const shouldKeepEndTargetAlive = isRetargetableBottomAlignedInitialScrollTarget(initialScroll) && peek$(ctx, "isAtEnd");
|
||||
+ const endTargetDistanceFromEnd = getContentSize(ctx) - state.scroll - state.scrollLength - getContentInsetEnd(ctx);
|
||||
+ const isNearEndForInsetList = getContentInsetStartAdjustment(ctx) > 0 && Number.isFinite(endTargetDistanceFromEnd) && endTargetDistanceFromEnd <= state.scrollLength * 0.5;
|
||||
+ const shouldKeepEndTargetAlive = isRetargetableBottomAlignedInitialScrollTarget(initialScroll) && (peek$(ctx, "isAtEnd") || isNearEndForInsetList);
|
||||
+ const shouldKeepEndTargetAlive = isRetargetableBottomAlignedInitialScrollTarget(initialScroll) && (peek$(ctx, "isAtEnd") || !state.didUserDrag && isNearEndForInsetList);
|
||||
if (!shouldKeepEndTargetAlive) {
|
||||
if (shouldPreserveInitialScrollForFooterLayout(initialScroll)) {
|
||||
clearPendingInitialScrollFooterLayout(ctx, {
|
||||
|
||||
Generated
+5
-5
@@ -91,7 +91,7 @@ patchedDependencies:
|
||||
'@effect/[email protected]': a16b1e870d8c29e4a98b17cc4c638a4ff471753d8ca3487f78a22b759caf951b
|
||||
'@expo/[email protected]': 96f1a75347e6ea02dc4b7034ace815d8ee39e18b8166ebfb573d9e58328f0dc2
|
||||
'@ff-labs/[email protected]': ab9ff544009e1891cfe3930105862d3699007f38922a79f3c98d90018deca368
|
||||
'@legendapp/[email protected]': 07ecf538deedf140bb0f3836291714960e0bbcafe0514192b59957f498d8d9d4
|
||||
'@legendapp/[email protected]': 2c042ab630ac8b857024c178ee8c145d99c2f7297d9f94f5676238f08f0806ee
|
||||
'@pierre/[email protected]': 0ccee155b93b63d810e2c1a40c1fd676fb6fbcfa72cf6430dcedf1a3ae475ab4
|
||||
'@react-native-ai/[email protected]': 2d09870c2848d185cb05b53ed823a46e12dba519324d8dd8e584e28731990f9d
|
||||
'@react-native-menu/[email protected]': f63d256bf6a97a873b5e628eb595bd6ef0075ddd5bdd890fc920f7a6024290dd
|
||||
@@ -236,7 +236,7 @@ importers:
|
||||
version: 57.0.14(@babel/[email protected])(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected])([email protected]([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected])([email protected])([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected])([email protected])([email protected]))(@types/[email protected])([email protected])([email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected])([email protected])([email protected]))(@types/[email protected])([email protected])([email protected])([email protected]))([email protected])
|
||||
'@legendapp/list':
|
||||
specifier: 'catalog:'
|
||||
version: 3.3.5(patch_hash=07ecf538deedf140bb0f3836291714960e0bbcafe0514192b59957f498d8d9d4)([email protected]([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected])([email protected])([email protected]))(@types/[email protected])([email protected])([email protected])([email protected]))([email protected])
|
||||
version: 3.3.5(patch_hash=2c042ab630ac8b857024c178ee8c145d99c2f7297d9f94f5676238f08f0806ee)([email protected]([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected])([email protected])([email protected]))(@types/[email protected])([email protected])([email protected])([email protected]))([email protected])
|
||||
'@noble/curves':
|
||||
specifier: 'catalog:'
|
||||
version: 1.9.1
|
||||
@@ -580,7 +580,7 @@ importers:
|
||||
version: 0.9.0
|
||||
'@legendapp/list':
|
||||
specifier: 'catalog:'
|
||||
version: 3.3.5(patch_hash=07ecf538deedf140bb0f3836291714960e0bbcafe0514192b59957f498d8d9d4)([email protected]([email protected]))([email protected])
|
||||
version: 3.3.5(patch_hash=2c042ab630ac8b857024c178ee8c145d99c2f7297d9f94f5676238f08f0806ee)([email protected]([email protected]))([email protected])
|
||||
'@lexical/react':
|
||||
specifier: ^0.41.0
|
||||
version: 0.41.0([email protected]([email protected]))([email protected])([email protected])
|
||||
@@ -13269,7 +13269,7 @@ snapshots:
|
||||
dependencies:
|
||||
jsbi: 4.3.2
|
||||
|
||||
'@legendapp/[email protected](patch_hash=07ecf538deedf140bb0f3836291714960e0bbcafe0514192b59957f498d8d9d4)([email protected]([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected])([email protected])([email protected]))(@types/[email protected])([email protected])([email protected])([email protected]))([email protected])':
|
||||
'@legendapp/[email protected](patch_hash=2c042ab630ac8b857024c178ee8c145d99c2f7297d9f94f5676238f08f0806ee)([email protected]([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected])([email protected])([email protected]))(@types/[email protected])([email protected])([email protected])([email protected]))([email protected])':
|
||||
dependencies:
|
||||
react: 19.2.3
|
||||
use-sync-external-store: 1.6.0([email protected])
|
||||
@@ -13277,7 +13277,7 @@ snapshots:
|
||||
react-dom: 19.2.3([email protected])
|
||||
react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected])([email protected])([email protected]))(@types/[email protected])([email protected])([email protected])([email protected])
|
||||
|
||||
'@legendapp/[email protected](patch_hash=07ecf538deedf140bb0f3836291714960e0bbcafe0514192b59957f498d8d9d4)([email protected]([email protected]))([email protected])':
|
||||
'@legendapp/[email protected](patch_hash=2c042ab630ac8b857024c178ee8c145d99c2f7297d9f94f5676238f08f0806ee)([email protected]([email protected]))([email protected])':
|
||||
dependencies:
|
||||
react: 19.2.6
|
||||
use-sync-external-store: 1.6.0([email protected])
|
||||
|
||||
Reference in new issue
Block a user