@ethora/chat-component-rn 26.7.8 → 26.7.10
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 +3 -2
- package/README.md +10 -0
- package/lib/commonjs/assets/icons.js +2 -2
- package/lib/commonjs/assets/icons.js.map +1 -1
- package/lib/commonjs/components/MainComponents/ChatRoom.js +76 -19
- package/lib/commonjs/components/MainComponents/ChatRoom.js.map +1 -1
- package/lib/commonjs/components/MainComponents/MediaMessage.js +8 -5
- package/lib/commonjs/components/MainComponents/MediaMessage.js.map +1 -1
- package/lib/commonjs/components/MainComponents/MessageContainer.js +5 -1
- package/lib/commonjs/components/MainComponents/MessageContainer.js.map +1 -1
- package/lib/commonjs/components/MainComponents/MessageList.js +2 -1
- package/lib/commonjs/components/MainComponents/MessageList.js.map +1 -1
- package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js +1 -51
- package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
- package/lib/commonjs/components/Modals/FilePreviewModal/FilePreviewModal.js +51 -12
- package/lib/commonjs/components/Modals/FilePreviewModal/FilePreviewModal.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/styled/LastMessageFile.js +12 -1
- package/lib/commonjs/components/RoomComponents/styled/LastMessageFile.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/styled/LastMessagePhoto.js +13 -2
- package/lib/commonjs/components/RoomComponents/styled/LastMessagePhoto.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/styled/LastMessageVideo.js +13 -2
- package/lib/commonjs/components/RoomComponents/styled/LastMessageVideo.js.map +1 -1
- package/lib/commonjs/components/styled/MessageImage.js +3 -1
- package/lib/commonjs/components/styled/MessageImage.js.map +1 -1
- package/lib/commonjs/components/styled/UnsupportedType.js +14 -4
- package/lib/commonjs/components/styled/UnsupportedType.js.map +1 -1
- package/lib/commonjs/components/styled/VideoMessage.js +3 -1
- package/lib/commonjs/components/styled/VideoMessage.js.map +1 -1
- package/lib/commonjs/context/xmppProvider.js +95 -36
- package/lib/commonjs/context/xmppProvider.js.map +1 -1
- package/lib/commonjs/helpers/createMessageFromXml.js +19 -1
- package/lib/commonjs/helpers/createMessageFromXml.js.map +1 -1
- package/lib/commonjs/helpers/getDisplayFileName.js +79 -0
- package/lib/commonjs/helpers/getDisplayFileName.js.map +1 -0
- package/lib/commonjs/helpers/getServerReadTimestamp.js +188 -0
- package/lib/commonjs/helpers/getServerReadTimestamp.js.map +1 -0
- package/lib/commonjs/helpers/initXmppRooms.js +9 -7
- package/lib/commonjs/helpers/initXmppRooms.js.map +1 -1
- package/lib/commonjs/helpers/insertMessageWithDelimiter.js +51 -9
- package/lib/commonjs/helpers/insertMessageWithDelimiter.js.map +1 -1
- package/lib/commonjs/helpers/isOwnMessage.js +75 -0
- package/lib/commonjs/helpers/isOwnMessage.js.map +1 -0
- package/lib/commonjs/helpers/keyboardLayout.js +12 -2
- package/lib/commonjs/helpers/keyboardLayout.js.map +1 -1
- package/lib/commonjs/helpers/mimeToExtension.js +6 -14
- package/lib/commonjs/helpers/mimeToExtension.js.map +1 -1
- package/lib/commonjs/helpers/msgSortableMs.js +37 -0
- package/lib/commonjs/helpers/msgSortableMs.js.map +1 -0
- package/lib/commonjs/hooks/useChatRoomFocus.js +45 -12
- package/lib/commonjs/hooks/useChatRoomFocus.js.map +1 -1
- package/lib/commonjs/hooks/useChatWrapperInit.js +12 -7
- package/lib/commonjs/hooks/useChatWrapperInit.js.map +1 -1
- package/lib/commonjs/hooks/useLogout.js +8 -0
- package/lib/commonjs/hooks/useLogout.js.map +1 -1
- package/lib/commonjs/i18n/strings.js +0 -18
- package/lib/commonjs/i18n/strings.js.map +1 -1
- package/lib/commonjs/networking/api-requests/rooms.api.js +0 -13
- package/lib/commonjs/networking/api-requests/rooms.api.js.map +1 -1
- package/lib/commonjs/networking/stanzaHandlers.js +20 -2
- package/lib/commonjs/networking/stanzaHandlers.js.map +1 -1
- package/lib/commonjs/networking/xmpp/flushLastViewedToPrivateStore.js +45 -11
- package/lib/commonjs/networking/xmpp/flushLastViewedToPrivateStore.js.map +1 -1
- package/lib/commonjs/networking/xmppClient.js +36 -2
- package/lib/commonjs/networking/xmppClient.js.map +1 -1
- package/lib/commonjs/roomStore/index.js +35 -2
- package/lib/commonjs/roomStore/index.js.map +1 -1
- package/lib/commonjs/roomStore/persistence.js +200 -11
- package/lib/commonjs/roomStore/persistence.js.map +1 -1
- package/lib/commonjs/roomStore/roomsSlice.js +148 -37
- package/lib/commonjs/roomStore/roomsSlice.js.map +1 -1
- package/lib/module/assets/icons.js +1 -1
- package/lib/module/assets/icons.js.map +1 -1
- package/lib/module/components/MainComponents/ChatRoom.js +77 -20
- package/lib/module/components/MainComponents/ChatRoom.js.map +1 -1
- package/lib/module/components/MainComponents/MediaMessage.js +9 -6
- package/lib/module/components/MainComponents/MediaMessage.js.map +1 -1
- package/lib/module/components/MainComponents/MessageContainer.js +5 -1
- package/lib/module/components/MainComponents/MessageContainer.js.map +1 -1
- package/lib/module/components/MainComponents/MessageList.js +2 -1
- package/lib/module/components/MainComponents/MessageList.js.map +1 -1
- package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js +3 -53
- package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
- package/lib/module/components/Modals/FilePreviewModal/FilePreviewModal.js +52 -13
- package/lib/module/components/Modals/FilePreviewModal/FilePreviewModal.js.map +1 -1
- package/lib/module/components/RoomComponents/styled/LastMessageFile.js +12 -1
- package/lib/module/components/RoomComponents/styled/LastMessageFile.js.map +1 -1
- package/lib/module/components/RoomComponents/styled/LastMessagePhoto.js +13 -2
- package/lib/module/components/RoomComponents/styled/LastMessagePhoto.js.map +1 -1
- package/lib/module/components/RoomComponents/styled/LastMessageVideo.js +13 -2
- package/lib/module/components/RoomComponents/styled/LastMessageVideo.js.map +1 -1
- package/lib/module/components/styled/MessageImage.js +3 -1
- package/lib/module/components/styled/MessageImage.js.map +1 -1
- package/lib/module/components/styled/UnsupportedType.js +14 -4
- package/lib/module/components/styled/UnsupportedType.js.map +1 -1
- package/lib/module/components/styled/VideoMessage.js +3 -1
- package/lib/module/components/styled/VideoMessage.js.map +1 -1
- package/lib/module/context/xmppProvider.js +96 -37
- package/lib/module/context/xmppProvider.js.map +1 -1
- package/lib/module/helpers/createMessageFromXml.js +19 -1
- package/lib/module/helpers/createMessageFromXml.js.map +1 -1
- package/lib/module/helpers/getDisplayFileName.js +73 -0
- package/lib/module/helpers/getDisplayFileName.js.map +1 -0
- package/lib/module/helpers/getServerReadTimestamp.js +181 -0
- package/lib/module/helpers/getServerReadTimestamp.js.map +1 -0
- package/lib/module/helpers/initXmppRooms.js +9 -7
- package/lib/module/helpers/initXmppRooms.js.map +1 -1
- package/lib/module/helpers/insertMessageWithDelimiter.js +52 -9
- package/lib/module/helpers/insertMessageWithDelimiter.js.map +1 -1
- package/lib/module/helpers/isOwnMessage.js +70 -0
- package/lib/module/helpers/isOwnMessage.js.map +1 -0
- package/lib/module/helpers/keyboardLayout.js +12 -2
- package/lib/module/helpers/keyboardLayout.js.map +1 -1
- package/lib/module/helpers/mimeToExtension.js +6 -13
- package/lib/module/helpers/mimeToExtension.js.map +1 -1
- package/lib/module/helpers/msgSortableMs.js +32 -0
- package/lib/module/helpers/msgSortableMs.js.map +1 -0
- package/lib/module/hooks/useChatRoomFocus.js +46 -13
- package/lib/module/hooks/useChatRoomFocus.js.map +1 -1
- package/lib/module/hooks/useChatWrapperInit.js +12 -7
- package/lib/module/hooks/useChatWrapperInit.js.map +1 -1
- package/lib/module/hooks/useLogout.js +8 -0
- package/lib/module/hooks/useLogout.js.map +1 -1
- package/lib/module/i18n/strings.js +0 -18
- package/lib/module/i18n/strings.js.map +1 -1
- package/lib/module/networking/api-requests/rooms.api.js +0 -12
- package/lib/module/networking/api-requests/rooms.api.js.map +1 -1
- package/lib/module/networking/stanzaHandlers.js +20 -2
- package/lib/module/networking/stanzaHandlers.js.map +1 -1
- package/lib/module/networking/xmpp/flushLastViewedToPrivateStore.js +45 -11
- package/lib/module/networking/xmpp/flushLastViewedToPrivateStore.js.map +1 -1
- package/lib/module/networking/xmppClient.js +36 -2
- package/lib/module/networking/xmppClient.js.map +1 -1
- package/lib/module/roomStore/index.js +37 -4
- package/lib/module/roomStore/index.js.map +1 -1
- package/lib/module/roomStore/persistence.js +197 -11
- package/lib/module/roomStore/persistence.js.map +1 -1
- package/lib/module/roomStore/roomsSlice.js +136 -33
- package/lib/module/roomStore/roomsSlice.js.map +1 -1
- package/lib/typescript/assets/icons.d.ts +0 -8
- package/lib/typescript/assets/icons.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/ChatRoom.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/MediaMessage.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/MessageContainer.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/MessageList.d.ts.map +1 -1
- package/lib/typescript/components/Modals/ChatProfileModal/ChatProfileModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/FilePreviewModal/FilePreviewModal.d.ts.map +1 -1
- package/lib/typescript/components/RoomComponents/styled/LastMessageFile.d.ts +1 -1
- package/lib/typescript/components/RoomComponents/styled/LastMessageFile.d.ts.map +1 -1
- package/lib/typescript/components/RoomComponents/styled/LastMessagePhoto.d.ts +1 -1
- package/lib/typescript/components/RoomComponents/styled/LastMessagePhoto.d.ts.map +1 -1
- package/lib/typescript/components/RoomComponents/styled/LastMessageVideo.d.ts +1 -1
- package/lib/typescript/components/RoomComponents/styled/LastMessageVideo.d.ts.map +1 -1
- package/lib/typescript/components/styled/MessageImage.d.ts +6 -0
- package/lib/typescript/components/styled/MessageImage.d.ts.map +1 -1
- package/lib/typescript/components/styled/UnsupportedType.d.ts.map +1 -1
- package/lib/typescript/components/styled/VideoMessage.d.ts +6 -0
- package/lib/typescript/components/styled/VideoMessage.d.ts.map +1 -1
- package/lib/typescript/context/xmppProvider.d.ts.map +1 -1
- package/lib/typescript/helpers/createMessageFromXml.d.ts.map +1 -1
- package/lib/typescript/helpers/getAvatarColor.d.ts +1 -1
- package/lib/typescript/helpers/getDisplayFileName.d.ts +49 -0
- package/lib/typescript/helpers/getDisplayFileName.d.ts.map +1 -0
- package/lib/typescript/helpers/getServerReadTimestamp.d.ts +108 -0
- package/lib/typescript/helpers/getServerReadTimestamp.d.ts.map +1 -0
- package/lib/typescript/helpers/initXmppRooms.d.ts.map +1 -1
- package/lib/typescript/helpers/insertMessageWithDelimiter.d.ts +1 -1
- package/lib/typescript/helpers/insertMessageWithDelimiter.d.ts.map +1 -1
- package/lib/typescript/helpers/isOwnMessage.d.ts +36 -0
- package/lib/typescript/helpers/isOwnMessage.d.ts.map +1 -0
- package/lib/typescript/helpers/keyboardLayout.d.ts +5 -1
- package/lib/typescript/helpers/keyboardLayout.d.ts.map +1 -1
- package/lib/typescript/helpers/mimeToExtension.d.ts +0 -15
- package/lib/typescript/helpers/mimeToExtension.d.ts.map +1 -1
- package/lib/typescript/helpers/msgSortableMs.d.ts +2 -0
- package/lib/typescript/helpers/msgSortableMs.d.ts.map +1 -0
- package/lib/typescript/hooks/useChatRoomFocus.d.ts +4 -1
- package/lib/typescript/hooks/useChatRoomFocus.d.ts.map +1 -1
- package/lib/typescript/hooks/useChatWrapperInit.d.ts.map +1 -1
- package/lib/typescript/hooks/useLogout.d.ts.map +1 -1
- package/lib/typescript/i18n/strings.d.ts.map +1 -1
- package/lib/typescript/networking/api-requests/rooms.api.d.ts +0 -1
- package/lib/typescript/networking/api-requests/rooms.api.d.ts.map +1 -1
- package/lib/typescript/networking/stanzaHandlers.d.ts.map +1 -1
- package/lib/typescript/networking/xmpp/flushLastViewedToPrivateStore.d.ts +9 -2
- package/lib/typescript/networking/xmpp/flushLastViewedToPrivateStore.d.ts.map +1 -1
- package/lib/typescript/networking/xmppClient.d.ts.map +1 -1
- package/lib/typescript/roomStore/index.d.ts.map +1 -1
- package/lib/typescript/roomStore/persistence.d.ts +18 -1
- package/lib/typescript/roomStore/persistence.d.ts.map +1 -1
- package/lib/typescript/roomStore/roomsSlice.d.ts +42 -3
- package/lib/typescript/roomStore/roomsSlice.d.ts.map +1 -1
- package/lib/typescript/types/models/room.model.d.ts +0 -1
- package/lib/typescript/types/models/room.model.d.ts.map +1 -1
- package/lib/typescript/types/types.d.ts +1 -1
- package/lib/typescript/types/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/assets/icons.tsx +0 -24
- package/src/components/MainComponents/ChatRoom.tsx +81 -19
- package/src/components/MainComponents/MediaMessage.tsx +8 -5
- package/src/components/MainComponents/MessageContainer.tsx +5 -1
- package/src/components/MainComponents/MessageList.tsx +2 -1
- package/src/components/Modals/ChatProfileModal/ChatProfileModal.tsx +2 -36
- package/src/components/Modals/FilePreviewModal/FilePreviewModal.tsx +63 -26
- package/src/components/RoomComponents/styled/LastMessageFile.tsx +14 -2
- package/src/components/RoomComponents/styled/LastMessagePhoto.tsx +14 -2
- package/src/components/RoomComponents/styled/LastMessageVideo.tsx +14 -2
- package/src/components/styled/MessageImage.tsx +8 -1
- package/src/components/styled/UnsupportedType.tsx +14 -4
- package/src/components/styled/VideoMessage.tsx +8 -1
- package/src/context/xmppProvider.tsx +122 -30
- package/src/helpers/createMessageFromXml.ts +20 -1
- package/src/helpers/getDisplayFileName.ts +87 -0
- package/src/helpers/getServerReadTimestamp.ts +197 -0
- package/src/helpers/initXmppRooms.tsx +9 -9
- package/src/helpers/insertMessageWithDelimiter.ts +55 -19
- package/src/helpers/isOwnMessage.ts +90 -0
- package/src/helpers/keyboardLayout.ts +23 -2
- package/src/helpers/mimeToExtension.ts +6 -22
- package/src/helpers/msgSortableMs.ts +25 -0
- package/src/hooks/useChatRoomFocus.ts +49 -9
- package/src/hooks/useChatWrapperInit.ts +12 -7
- package/src/hooks/useLogout.tsx +14 -0
- package/src/i18n/strings.ts +0 -18
- package/src/networking/api-requests/rooms.api.ts +0 -9
- package/src/networking/stanzaHandlers.ts +20 -6
- package/src/networking/xmpp/flushLastViewedToPrivateStore.ts +65 -18
- package/src/networking/xmppClient.ts +41 -2
- package/src/roomStore/index.ts +40 -4
- package/src/roomStore/persistence.ts +197 -7
- package/src/roomStore/roomsSlice.ts +158 -28
- package/src/types/models/room.model.ts +0 -1
- package/src/types/types.ts +14 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,8 +7,7 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); this pr
|
|
|
7
7
|
|
|
8
8
|
### Added
|
|
9
9
|
|
|
10
|
-
-
|
|
11
|
-
|
|
10
|
+
- **`config.inputDockPaddingBottom`** - controls the input dock's bottom padding directly, used verbatim on both platforms when a number is given (0 allowed), instead of the built-in default (iOS safe-area inset, 12dp on Android). Customer-reported #44.
|
|
12
11
|
- **`handlePushPayload(data)` / `openRoomFromPush(jid)` are exported from the package root.** The host owns the native push side (token, permission, tap listeners) and hands the tapped notification's `data` to `handlePushPayload`: a call push rings, a message push (`data.jid` / `chatJid` / `roomJid`) opens its room — immediately when the room list is loaded, otherwise as soon as it is (`usePendingNotification` is now mounted in `ChatWrapper` and actually opens the room; it used to find it and do nothing). The pending jid is also persisted (with a 5-minute TTL), so a tap handled by a JS context that gets replaced right after (cold-start races) still opens the room on the next mount.
|
|
13
12
|
- **`config.headerLayout.safeAreaTop`** — the room-list and chat header cards pad their top by the safe-area inset and run under the status bar as one white surface. Hosts used to wrap `<Chat>` in a top-edge `SafeAreaView`, which painted its own white band above the card; on Android the card's elevation drew a hairline seam where the two met. Off by default, so existing hosts keep their layout; when on, drop the host-side top inset.
|
|
14
13
|
|
|
@@ -59,6 +58,7 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); this pr
|
|
|
59
58
|
|
|
60
59
|
### Fixed
|
|
61
60
|
|
|
61
|
+
- **Leaving a room while scrolled up marked genuinely-unread messages as read, locally and on the server (customer #42, a regression of #33 reintroduced by #38).** #38 anchored the read marker to the newest server-acknowledged message instead of `Date.now()`, but every "leaving this room" path (unmount, AppState background, the host's `isVisible` prop going false, the live `advance()` effect, `useChatRoomFocus`) then stamped that newest message unconditionally, regardless of how far the user had actually scrolled - and because the private-store merge is forward-only, a later correct (smaller) marker could never overwrite the wrong one. A per-room read boundary (`rooms.readBoundaries`, populated by `MessageList` the moment the user scrolls away from the bottom) is now the single source every one of those paths consults via the new `getReadMarkerTimestamp` helper, and is carried through to the server write as `visibleRoomTs`. Also fixed: the "New messages" divider landed one message too high (above the last read message instead of directly below it). The divider was positioned by comparing `msg.date` strings against `new Date(marker).toString()`, and `Date.prototype.toString()` has second precision - the marker was silently truncated down to the whole second, so the very message it points at compared as "newer" and fell on the unread side, disagreeing by one with the unread count (which compares exact milliseconds). `insertMessageWithDelimiter` now compares numerically, on the same server id-encoded `msgSortableMs` source the unread count itself uses, and also accepts a raw numeric marker (`new Date("1700000000000")` is an Invalid Date, so a numeric-string marker used to make every comparison false).
|
|
62
62
|
- **Push notifications never arrived for users who only ever signed in through this SDK.** The `initBeforeLoad` bootstrap in `XmppProvider` re-joined rooms with presence but never sent the MucSub (`urn:xmpp:mucsub:0`) subscription — only the legacy `ChatWrapper` path did, via `initRoomsPresence`. ejabberd decides whom to push for offline messages by MucSub subscriptions, so such users had a registered device token and still got nothing ("no MucSub subscription" server-side). The bootstrap and the reconnect `onOnline` handler now subscribe every room in the store after the presence pass, regardless of how that pass ended; `pushSubscriptionService` still dedupes rooms already subscribed on the device.
|
|
63
63
|
- **MucSub subscriptions are sent in parallel batches and carry unique IQ ids.** The pass used to be strictly sequential (await + 100 ms pause per room, 5 s timeout each), so a user with a few dozen rooms needed minutes and a backgrounded socket died long before the end, leaving most rooms unsubscribed. Ids were `newSubscription:<Date.now()>`, which in a batch made every request resolve on the first reply. A refused subscription now logs the server's condition (`registration-required`, `forbidden`, …) so room-config / affiliation problems are visible instead of silent.
|
|
64
64
|
- **The XMPP stream is closed as soon as the app goes to the background** (`XmppClient.suspend()`), and reopened on foreground (`resume()` → immediate reconnect). Android keeps a backgrounded WebSocket alive for minutes; while it lived, ejabberd still saw the user online and routed new messages into the socket instead of sending a push — so only the very first push after a cold start ever arrived, and nothing after the app had been opened and backgrounded again. The suspend is immediate, not deferred: RN pauses JS timers while an Android app is backgrounded. A reconnect that was in flight when the app got backgrounded closes its fresh socket at once, and `resume()` skips the 3 s `stop()` timeout on the already-closed client. Opt out with `xmppSettings.keepAliveInBackground: true`.
|
|
@@ -80,6 +80,7 @@ The repo itself now lives on **Expo SDK 57 (RN 0.86.2, React 19.2.8, New Archite
|
|
|
80
80
|
|
|
81
81
|
### Changed
|
|
82
82
|
|
|
83
|
+
- **The input dock's bottom padding now defaults to `0` when `disableKeyboardAvoidingView` is set** (it used to be the iOS safe-area inset / 12dp on Android regardless). A host that owns keyboard layout typically already places the chat above its own chrome, e.g. a tab bar, and the built-in padding added a visible extra gap there (customer-reported #44). **Behaviour change for existing consumers of `disableKeyboardAvoidingView`:** if your chat does sit at the very bottom of the screen and you want the old inset back, set `config.inputDockPaddingBottom` explicitly. Hosts that do not set `disableKeyboardAvoidingView` are unaffected.
|
|
83
84
|
- **Dev/test toolchain moved SDK 54 → 57**: `expo ~57`, `react-native 0.86.2`, `react 19.2.8`, `jest-expo ~57`, all `expo-*` dev pins to `57.x`, `reanimated ~4.5`, `worklets ~0.10`, `gesture-handler ~2.32`, `screens ~4.26`, `safe-area-context ~5.7`, `svg 15.15.4`, `netinfo 12`. LiveKit dev pins moved to the RN 0.86 line: `@livekit/react-native 2.12.0`, `@livekit/react-native-webrtc 144.1.2`, `livekit-client 2.21.0`.
|
|
84
85
|
- **iOS `deploymentTarget` 15.1 → 16.4** in `app.json` — the minimum `expo-modules-core@57` accepts.
|
|
85
86
|
- **`StyleSheet.absoluteFillObject` → `StyleSheet.absoluteFill`** across 9 files: RN 0.86 removed `absoluteFillObject` entirely; `absoluteFill` is the same plain object on every RN version our peer range spans, so spreads keep working for SDK 54 consumers.
|
package/README.md
CHANGED
|
@@ -18,6 +18,7 @@ React Native chat UI + chat core for iOS and Android, powered by the Ethora plat
|
|
|
18
18
|
- [Unread tracking in tab-based hosts](#unread-tracking-in-tab-based-hosts)
|
|
19
19
|
- [Logging out](#logging-out)
|
|
20
20
|
- [Customization flags worth knowing](#customization-flags-worth-knowing)
|
|
21
|
+
- [Keyboard handling](#keyboard-handling)
|
|
21
22
|
- [Header height & font sizing](#header-height--font-sizing)
|
|
22
23
|
- [Quality & test coverage](#quality--test-coverage)
|
|
23
24
|
- [Local development](#local-development)
|
|
@@ -314,6 +315,15 @@ Why awaitable: the persistence layer debounces writes by 200 ms, and the chat sl
|
|
|
314
315
|
| `disableConnectionErrorOverlay` | Replaces the full-screen "Connection error" overlay with a small, non-blocking `ConnectionBanner`. Set this when a transient reconnect shouldn't take over the whole screen. |
|
|
315
316
|
| `eventHandlers.onMessageRetry` | `(event) => void` fired when the user taps the "Failed — tap to retry" indicator on a stuck send. Use for telemetry / surfacing a retry banner. |
|
|
316
317
|
|
|
318
|
+
## Keyboard handling
|
|
319
|
+
|
|
320
|
+
| Flag | What it does |
|
|
321
|
+
| --- | --- |
|
|
322
|
+
| `disableKeyboardAvoidingView` | Opts out of the built-in `KeyboardAvoidingView`, so a host app that already wraps `<Chat>` in its own keyboard handling doesn't get a second one avoiding the keyboard on top of it. |
|
|
323
|
+
| `keyboardStickyInput` | Wraps only the input dock in a `KeyboardStickyView` instead of avoiding the keyboard for the whole chat tree, so the message list never resizes. Ignored when `disableKeyboardAvoidingView` is set. |
|
|
324
|
+
| `keyboardVerticalOffset` | Pass-through offset added on top of the iOS safe-area inset when avoiding the keyboard. |
|
|
325
|
+
| `inputDockPaddingBottom` | Bottom padding on the input dock (the composer's outer wrapper). When a number is given (0 allowed), it is used verbatim on both platforms. Left unset, it defaults to `0` when `disableKeyboardAvoidingView` is set, since the host then owns layout and the chat is typically already placed above the host's own chrome (e.g. a tab bar) - the built-in padding would otherwise add an extra gap. Otherwise it is unchanged: the iOS safe-area inset, or a fixed 12dp gap on Android. |
|
|
326
|
+
|
|
317
327
|
## Header height & font sizing
|
|
318
328
|
|
|
319
329
|
### Header height (`headerLayout.height`)
|