mattermost-mobile/patches/@shopify+flash-list+1.7.6.patch
Elias Nahum 374f812b98
Update dependencies (#8721)
* update fastlane

* update dev dependencies

* update to eslint 9+

* update testing-library

* update react-intl

* update bottom-sheet

* update expo

* update reanimated

* upgrade msgpack

* upgrade datepicker

* upgrade react-navigation

* update sentry

* update FlasList

* update fuse.js moment-timezone node-html-parser and semver

* update gesture-handler

* update image-picker

* update react-native-keychain

* update react-native-localize

* update react-native-navigation

* update watermelonDB

* update react-native-permissions

* update react-native-safe-area-context and react-native-screens

* update react-native-share and react-native-svg

* update react-native-video and react-native-webrtc

* update @mattermost/rnutils

* update @mattermost/rnshare

* update @mattermost/hardware-keyboard

* fix isMainActivity

* update android dependencies

* fix upload file progress indicator

* fix entry update config & license

* revert to stable version of @sentry/react-native

* update react-intl again

* update moment-timezone

* upgrade @react-native-camera-roll/camera-roll

* update @react-native-clipboard/clipboard

* update @react-navigation again

* update @shopify/flash-list

* update eslint

* update expo again

* update html-entities

* update mime-db

* update react-native-permissions

* Revert "update react-intl again"

This reverts commit e8e6d5a60dfa56b82b810cbbd7cdffec7697ffc7.

* Revert "update react-intl"

This reverts commit c77f329bb38910aeeba03869b72d77a8b0e00ba1.

* update react-native-keychain

* update and patch react-intl

* mend

* feedback during review 1
2025-04-07 09:30:06 +08:00

53 lines
2.8 KiB
Diff

diff --git a/node_modules/@shopify/flash-list/dist/FlashList.js b/node_modules/@shopify/flash-list/dist/FlashList.js
index 486a284..1ad99e4 100644
--- a/node_modules/@shopify/flash-list/dist/FlashList.js
+++ b/node_modules/@shopify/flash-list/dist/FlashList.js
@@ -159,6 +159,8 @@ var FlashList = /** @class */ (function (_super) {
(_a = _this.stickyContentContainerRef) === null || _a === void 0 ? void 0 : _a.setEnabled(_this.isStickyEnabled);
};
_this.rowRendererSticky = function (index) {
+ var _a, _b;
+ (_b = (_a = _this.props).onStickyHeaderIndexChanged) === null || _b === void 0 ? void 0 : _b.call(_a, index);
return _this.rowRendererWithIndex(index, FlashListProps_1.RenderTargetOptions.StickyHeader);
};
_this.rowRendererWithIndex = function (index, target) {
diff --git a/node_modules/@shopify/flash-list/dist/FlashListProps.d.ts b/node_modules/@shopify/flash-list/dist/FlashListProps.d.ts
index 19055e9..aa586ed 100644
--- a/node_modules/@shopify/flash-list/dist/FlashListProps.d.ts
+++ b/node_modules/@shopify/flash-list/dist/FlashListProps.d.ts
@@ -187,6 +187,10 @@ export interface FlashListProps<TItem> extends ScrollViewProps {
viewableItems: ViewToken[];
changed: ViewToken[];
}) => void) | null | undefined;
+ /**
+ * Called when the sticky headers change. This event is raised when the sticky header index changes.
+ */
+ onStickyHeaderIndexChanged?: ((index: number) => void) | null | undefined;
/**
* If provided, a standard RefreshControl will be added for "Pull to Refresh" functionality.
* Make sure to also set the refreshing prop correctly.
diff --git a/node_modules/@shopify/flash-list/src/FlashList.tsx b/node_modules/@shopify/flash-list/src/FlashList.tsx
index 0e9f071..a158be1 100644
--- a/node_modules/@shopify/flash-list/src/FlashList.tsx
+++ b/node_modules/@shopify/flash-list/src/FlashList.tsx
@@ -642,6 +642,7 @@ class FlashList<T> extends React.PureComponent<
};
private rowRendererSticky = (index: number) => {
+ this.props.onStickyHeaderIndexChanged?.(index);
return this.rowRendererWithIndex(index, RenderTargetOptions.StickyHeader);
};
diff --git a/node_modules/@shopify/flash-list/src/FlashListProps.ts b/node_modules/@shopify/flash-list/src/FlashListProps.ts
index 77e6096..f61fe03 100644
--- a/node_modules/@shopify/flash-list/src/FlashListProps.ts
+++ b/node_modules/@shopify/flash-list/src/FlashListProps.ts
@@ -251,6 +251,8 @@ export interface FlashListProps<TItem> extends ScrollViewProps {
| null
| undefined;
+ onStickyHeaderIndexChanged?: ((index: number) => void) | null | undefined;
+
/**
* If provided, a standard RefreshControl will be added for "Pull to Refresh" functionality.
* Make sure to also set the refreshing prop correctly.