@poolse/react-native 2.22.1 → 2.23.1

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
@@ -4,6 +4,30 @@ All notable changes to `@poolse/react-native` are documented here.
4
4
  Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/);
5
5
  versions follow [semver](https://semver.org).
6
6
 
7
+ ## [2.23.1] — 2026-10-14
8
+
9
+ ### Fixed
10
+
11
+ - **The 2x2 video grid's bottom row sat under Android's navigation
12
+ bar.** The filling grid spanned the whole edge-to-edge window; it
13
+ now pads by the safe area, so tiles never sit under system UI. The
14
+ auto-hiding call chrome may still float over a tile — tap to clear
15
+ it — but the OS bars never cover a face.
16
+
17
+ ## [2.23.0] — 2026-10-14
18
+
19
+ ### Fixed
20
+
21
+ - **Leaving a group call no longer ends it for everyone.** With two or
22
+ more others still connected, hanging up just walks out — the room's
23
+ presence tells them — and the end-the-call signal is only sent when
24
+ at most one other person remains. WhatsApp semantics.
25
+ - **The video grid clears the control dock.** The grid's bottom
26
+ clearance matched the old chrome; a group call's last row of tiles
27
+ hid behind the new dock and hang-up button.
28
+ - Errors only show while the call is NOT working — a stale "timed out"
29
+ banner no longer sits over a healthy connected call.
30
+
7
31
  ## [2.22.1] — 2026-10-14
8
32
 
9
33
  ### Fixed
package/dist/index.cjs CHANGED
@@ -5791,7 +5791,10 @@ function CallVideoGrid({
5791
5791
  const others = react.useMemo(() => participants.filter((p) => !p.isSelf), [participants]);
5792
5792
  const columns = others.length + 1 <= 6 ? 2 : 3;
5793
5793
  const rows = Math.ceil((others.length + 1) / columns);
5794
- const tileHeight = size.height > 0 ? (size.height - GAP * (rows - 1)) / rows : 0;
5794
+ const padTop = safeArea?.top ?? 0;
5795
+ const padBottom = safeArea?.bottom ?? 0;
5796
+ const availableHeight = size.height > 0 ? size.height - padTop - padBottom : 0;
5797
+ const tileHeight = availableHeight > 0 ? (availableHeight - GAP * (rows - 1)) / rows : 0;
5795
5798
  const scrolls = tileHeight > 0 && tileHeight < MIN_TILE_HEIGHT;
5796
5799
  if (participants.length === 0) return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles30.stage, onLayout });
5797
5800
  if (others.length <= 1) {
@@ -5839,17 +5842,24 @@ function CallVideoGrid({
5839
5842
  },
5840
5843
  participant.userId
5841
5844
  )) });
5842
- return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles30.stage, onLayout, children: scrolls ? /* @__PURE__ */ jsxRuntime.jsx(
5843
- reactNative.ScrollView,
5845
+ return /* @__PURE__ */ jsxRuntime.jsx(
5846
+ reactNative.View,
5844
5847
  {
5845
- contentContainerStyle: [
5846
- styles30.scroll,
5847
- { paddingBottom: (chromeInsets?.bottom ?? 0) + GAP }
5848
- ],
5849
- showsVerticalScrollIndicator: false,
5850
- children: grid
5848
+ style: [styles30.stage, { paddingTop: padTop, paddingBottom: padBottom }],
5849
+ onLayout,
5850
+ children: scrolls ? /* @__PURE__ */ jsxRuntime.jsx(
5851
+ reactNative.ScrollView,
5852
+ {
5853
+ contentContainerStyle: [
5854
+ styles30.scroll,
5855
+ { paddingBottom: (chromeInsets?.bottom ?? 0) + GAP }
5856
+ ],
5857
+ showsVerticalScrollIndicator: false,
5858
+ children: grid
5859
+ }
5860
+ ) : grid
5851
5861
  }
5852
- ) : grid });
5862
+ );
5853
5863
  }
5854
5864
  var styles30 = reactNative.StyleSheet.create({
5855
5865
  stage: { flex: 1, overflow: "hidden" },
@@ -6142,10 +6152,14 @@ function CallScreen({
6142
6152
  [wakeChrome]
6143
6153
  );
6144
6154
  const hangUp = react.useCallback(() => {
6155
+ const othersOnCall = (usingSfu ? sfu.participants : mesh.participants).filter(
6156
+ (p) => !p.isSelf
6157
+ ).length;
6145
6158
  sfu.leave();
6146
6159
  mesh.leave();
6147
- void calls.hangUp();
6148
- }, [sfu, mesh, calls]);
6160
+ if (calls.phase === "active" && othersOnCall >= 2) calls.reset();
6161
+ else void calls.hangUp();
6162
+ }, [sfu, mesh, calls, usingSfu]);
6149
6163
  const alone = usingSfu ? sfu.alone : mesh.alone;
6150
6164
  const endedOnEmpty = react.useRef(false);
6151
6165
  if (calls.phase !== "active") endedOnEmpty.current = false;
@@ -6186,10 +6200,11 @@ function CallScreen({
6186
6200
  const statusText = duration ?? statusLine(calls, status);
6187
6201
  const subtitle = convName && !duration && peerIds.length > 0 ? `${peerTitle} \xB7 ${statusText}` : statusText;
6188
6202
  const showStage = connected && usingSfu && participants.length > 0;
6189
- const error = calls.error ?? (usingSfu ? sfu.error : mesh.error);
6203
+ const rawError = calls.error ?? (usingSfu ? sfu.error : mesh.error);
6204
+ const error = connected ? null : rawError;
6190
6205
  const chromeInsets = {
6191
6206
  top: insets.top + 72,
6192
- bottom: insets.bottom + 150
6207
+ bottom: insets.bottom + 236
6193
6208
  };
6194
6209
  return /* @__PURE__ */ jsxRuntime.jsxs(
6195
6210
  reactNative.Modal,