@robono/messaging-react-native 0.26.2 → 0.26.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.26.3 — 2026-11-30
4
+
5
+ Follow incoming messages after row layout when reading at the bottom. Preserve the visible history position when reading older messages, and cancel queued following on user interaction.
6
+
3
7
  ## 0.26.2 — 2026-11-18
4
8
 
5
9
  Reuse authorized media previews and defer attachment downloads until needed on iPhone and Android.
package/SBOM.spdx.json CHANGED
@@ -2,10 +2,10 @@
2
2
  "spdxVersion": "SPDX-2.3",
3
3
  "dataLicense": "CC0-1.0",
4
4
  "SPDXID": "SPDXRef-DOCUMENT",
5
- "name": "@robono/messaging-react-native@0.26.2",
6
- "documentNamespace": "https://robono.com/sbom/messaging-react-native/0.26.2/faf739bb6204f993332eed18bd61ae2e07c51d40",
5
+ "name": "@robono/messaging-react-native@0.26.3",
6
+ "documentNamespace": "https://robono.com/sbom/messaging-react-native/0.26.3/90db6c88cf661788bc7e6f71b9d269600c7a1c7b",
7
7
  "creationInfo": {
8
- "created": "2026-11-18T20:08:30.965Z",
8
+ "created": "2026-11-30T10:07:24.110Z",
9
9
  "creators": [
10
10
  "Organization: Robono (support@robono.com)"
11
11
  ]
@@ -14,11 +14,11 @@
14
14
  {
15
15
  "name": "@robono/messaging-react-native",
16
16
  "SPDXID": "SPDXRef-Package",
17
- "versionInfo": "0.26.2",
17
+ "versionInfo": "0.26.3",
18
18
  "downloadLocation": "NOASSERTION",
19
19
  "filesAnalyzed": true,
20
20
  "packageVerificationCode": {
21
- "packageVerificationCodeValue": "faf739bb6204f993332eed18bd61ae2e07c51d40"
21
+ "packageVerificationCodeValue": "90db6c88cf661788bc7e6f71b9d269600c7a1c7b"
22
22
  },
23
23
  "licenseConcluded": "LicenseRef-RobonoSDK",
24
24
  "licenseDeclared": "LicenseRef-RobonoSDK",
@@ -55,11 +55,11 @@
55
55
  "checksums": [
56
56
  {
57
57
  "algorithm": "SHA256",
58
- "checksumValue": "941bda682a7b57ece95a907abe3f03cabee5c2af20e41aac776cc7bafbdd69b7"
58
+ "checksumValue": "83fd81f324dbdf5a34803c3cefb69ae7f1cd60b4a1b3292418f140a149ba888f"
59
59
  },
60
60
  {
61
61
  "algorithm": "SHA1",
62
- "checksumValue": "083d83d4227309aba41b30d7b28c9753917f6249"
62
+ "checksumValue": "7e84c79db21d470247f4f1123d9d301463ece015"
63
63
  }
64
64
  ],
65
65
  "licenseConcluded": "LicenseRef-RobonoSDK",
@@ -3076,11 +3076,11 @@
3076
3076
  "checksums": [
3077
3077
  {
3078
3078
  "algorithm": "SHA256",
3079
- "checksumValue": "0e44c2abd8ce6529fd4ec86cb6958c08391f925e1ccb5dc775d5e3c2b68eb23a"
3079
+ "checksumValue": "d8899972632bfab0cfd9c1f744348164e0bf9c42e83e0d801661becefac6e776"
3080
3080
  },
3081
3081
  {
3082
3082
  "algorithm": "SHA1",
3083
- "checksumValue": "61190012bd7feec7b00dbe6169bef3c1fa54fd3e"
3083
+ "checksumValue": "9ba66e21cae68ab93c4a72080c87dc4c66216c9a"
3084
3084
  }
3085
3085
  ],
3086
3086
  "licenseConcluded": "LicenseRef-RobonoSDK",
@@ -5242,11 +5242,11 @@
5242
5242
  "checksums": [
5243
5243
  {
5244
5244
  "algorithm": "SHA256",
5245
- "checksumValue": "0711d4c2a53cd19f271f4d65347c4720aa72fad075c00d7a4216e69783ac4ee1"
5245
+ "checksumValue": "fed210ab03cfa356dafcd6c215db2daff32a02450613822872b89adb66082ec7"
5246
5246
  },
5247
5247
  {
5248
5248
  "algorithm": "SHA1",
5249
- "checksumValue": "5e7b8fcce5e4e739ce7b6494a7920953d42dcf53"
5249
+ "checksumValue": "161f9e99cd777f19c368b2c820af379273b6287f"
5250
5250
  }
5251
5251
  ],
5252
5252
  "licenseConcluded": "LicenseRef-RobonoSDK",
package/dist/index.js CHANGED
@@ -661,6 +661,21 @@ export function MessagingList() {
661
661
  if (historyInteraction.current.conversationId !== state.conversationId)
662
662
  historyInteraction.current = { conversationId: state.conversationId, dragged: false };
663
663
  const nearLatest = useRef(true), lastNewest = useRef(''), lastPending = useRef('');
664
+ const latestFrame = useRef(null);
665
+ const cancelLatestScroll = () => { if (latestFrame.current !== null)
666
+ cancelAnimationFrame(latestFrame.current); latestFrame.current = null; };
667
+ const followLatestLayout = () => {
668
+ if (!nearLatest.current || state.historyWindow || scrollTarget.current)
669
+ return;
670
+ cancelLatestScroll();
671
+ latestFrame.current = requestAnimationFrame(() => {
672
+ latestFrame.current = null;
673
+ if (nearLatest.current && !scrollTarget.current)
674
+ list.current?.scrollToOffset({ offset: 0, animated: false });
675
+ });
676
+ };
677
+ const interruptLatestScroll = () => { cancelLatestScroll(); historyInteraction.current.dragged = true; scrollTarget.current = null; };
678
+ useLayoutEffect(() => () => cancelLatestScroll(), [state.conversationId]);
664
679
  const [away, setAway] = useState(false), [newMessages, setNewMessages] = useState(false);
665
680
  const [historyHeight, setHistoryHeight] = useState(0);
666
681
  const [scrolling, setScrolling] = useState(false);
@@ -723,10 +738,14 @@ export function MessagingList() {
723
738
  }
724
739
  }, [client, readingKey, state.loading, state.settings?.enabled]);
725
740
  const newest = items[0]?.clientMessageId ?? '', outgoing = state.pending.at(-1)?.clientMessageId ?? '';
726
- useEffect(() => {
741
+ useLayoutEffect(() => {
727
742
  if (newest && newest !== lastNewest.current) {
728
- if (!state.historyWindow && nearLatest.current || (outgoing && outgoing !== lastPending.current))
729
- requestAnimationFrame(() => jumpToLatest(false));
743
+ if (outgoing && outgoing !== lastPending.current)
744
+ jumpToLatest(false);
745
+ // Arm before layout/anchoring scroll events; content-size callbacks repeat
746
+ // the follow after virtualized rows and delayed media actually lay out.
747
+ else if (!state.historyWindow && nearLatest.current)
748
+ followLatestLayout();
730
749
  else if (!state.historyWindow)
731
750
  setNewMessages(true);
732
751
  }
@@ -803,9 +822,11 @@ export function MessagingList() {
803
822
  }, [context, items, highlight, selection, setSelection, design, components?.Message]);
804
823
  return (_jsxs(View, { style: { flex: 1, minHeight: 0 }, children: [_jsx(Privacy, { enabled: !!context.extrasState?.privacyLens, background: design.colors.background, children: _jsx(FlatList, { ref: list, testID: "messaging-history", onLayout: event => { setHistoryHeight(event.nativeEvent.layout.height); const target = scrollTarget.current; if (target)
805
824
  requestAnimationFrame(() => { if (scrollTarget.current === target)
806
- list.current?.scrollToIndex({ index: target.index, viewPosition: .5, animated: false }); }); }, maintainVisibleContentPosition: highlight ? undefined : { minIndexForVisible: 0 }, onContentSizeChange: () => { const target = scrollTarget.current; if (target)
825
+ list.current?.scrollToIndex({ index: target.index, viewPosition: .5, animated: false }); }); }, maintainVisibleContentPosition: highlight ? undefined : { minIndexForVisible: 0, ...(!state.historyWindow ? { autoscrollToTopThreshold: 80 } : {}) }, onContentSizeChange: () => { const target = scrollTarget.current; if (target)
807
826
  requestAnimationFrame(() => { if (scrollTarget.current === target)
808
- list.current?.scrollToIndex({ index: target.index, viewPosition: .5, animated: false }); }); },
827
+ list.current?.scrollToIndex({ index: target.index, viewPosition: .5, animated: false }); });
828
+ else
829
+ followLatestLayout(); },
809
830
  // Keep nearby history ready without mounting most of a long conversation.
810
831
  // Smaller batches leave the JS thread available for incoming messages,
811
832
  // gestures and receipt updates while the user scrolls.
@@ -819,13 +840,14 @@ export function MessagingList() {
819
840
  target.retryTimer = setTimeout(() => { target.retryTimer = undefined; if (scrollTarget.current === target)
820
841
  list.current?.scrollToIndex({ index: target.index, viewPosition: .5, animated: false }); }, 150);
821
842
  list.current?.scrollToOffset({ offset: info.averageItemLength * info.index, animated: false });
822
- }, onScrollBeginDrag: () => { historyInteraction.current.dragged = true; scrollTarget.current = null; scrollingStarted(); }, ...(Platform.OS === 'web' ? {
843
+ }, onScrollBeginDrag: () => { interruptLatestScroll(); scrollingStarted(); }, ...(Platform.OS === 'web' ? {
823
844
  // Browser wheel/keyboard/scrollbar input does not emit native drag events.
824
- onWheel: () => { historyInteraction.current.dragged = true; },
825
- onPointerDown: () => { historyInteraction.current.dragged = true; },
845
+ onWheel: interruptLatestScroll,
846
+ onPointerDown: interruptLatestScroll,
826
847
  onKeyDown: (event) => { if (['ArrowUp', 'ArrowDown', 'PageUp', 'PageDown', 'Home', 'End', ' '].includes(event.key))
827
- historyInteraction.current.dragged = true; },
828
- } : {}), onScrollEndDrag: scrollingSettled, onMomentumScrollBegin: scrollingStarted, onMomentumScrollEnd: scrollingSettled, onScroll: event => { scrollingStarted(); scrollingSettled(); const near = event.nativeEvent.contentOffset.y < 80; nearLatest.current = near; setAway(!near); if (near)
848
+ interruptLatestScroll(); },
849
+ } : {}), onScrollEndDrag: scrollingSettled, onMomentumScrollBegin: scrollingStarted, onMomentumScrollEnd: scrollingSettled, onScroll: event => { scrollingStarted(); scrollingSettled(); if (latestFrame.current !== null)
850
+ return; const near = event.nativeEvent.contentOffset.y < 80; nearLatest.current = near; setAway(!near); if (near)
829
851
  setNewMessages(false); }, scrollEventThrottle: 32, data: items, inverted: true, keyExtractor: (m) => m.senderId + ':' + m.clientMessageId, style: { flex: 1 }, keyboardShouldPersistTaps: "handled", contentContainerStyle: { paddingHorizontal: 12, paddingVertical: 10, paddingTop: context.extrasState?.privacyLens ? privacyReadingStripHeight + 10 : 10, flexGrow: 1, justifyContent: context.extrasState?.privacyLens ? "flex-start" : "flex-end" }, onViewableItemsChanged: onVisible, viewabilityConfig: {
830
852
  itemVisiblePercentThreshold: 50,
831
853
  minimumViewTime: 500,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robono/messaging-react-native",
3
- "version": "0.26.2",
3
+ "version": "0.26.3",
4
4
  "type": "module",
5
5
  "sideEffects": [
6
6
  "./dist/expo-notification-cleanup.js"