@poolse/react 2.23.0 → 2.24.0
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 +17 -0
- package/dist/index.cjs +15 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,23 @@ All notable changes to `@poolse/react` are documented here. Format follows
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versions follow
|
|
5
5
|
[semver](https://semver.org).
|
|
6
6
|
|
|
7
|
+
## [2.24.0] — 2026-10-14
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **Group calls survive any hang-up path.** `hangUp` is the one
|
|
12
|
+
chokepoint every end-path shares — the in-call button, CallKit's
|
|
13
|
+
end event, the OS back gesture — and it now consults
|
|
14
|
+
`reportOthersOnCall`: with two or more others on the call, hanging
|
|
15
|
+
up leaves quietly; the end-the-call signal is reserved for the last
|
|
16
|
+
pair. The earlier guard lived only in CallScreen's button, so
|
|
17
|
+
CallKit's end event still tore down group calls for everyone.
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
|
|
21
|
+
- `reportOthersOnCall(count)` — hosts (CallScreen does it
|
|
22
|
+
automatically) keep the hook's picture of the call current.
|
|
23
|
+
|
|
7
24
|
## [2.23.0] — 2026-10-14
|
|
8
25
|
|
|
9
26
|
### Fixed
|
package/dist/index.cjs
CHANGED
|
@@ -1547,7 +1547,21 @@ function useCalls(userId, opts = {}) {
|
|
|
1547
1547
|
}, ringTimeoutMs);
|
|
1548
1548
|
return () => clearTimeout(timer);
|
|
1549
1549
|
}, [phase, ringTimeoutMs]);
|
|
1550
|
+
const othersOnCallRef = react.useRef(0);
|
|
1551
|
+
const reportOthersOnCall = react.useCallback((count) => {
|
|
1552
|
+
othersOnCallRef.current = count;
|
|
1553
|
+
}, []);
|
|
1550
1554
|
const hangUp = react.useCallback(async () => {
|
|
1555
|
+
if (phaseRef.current === "active" && othersOnCallRef.current >= 2) {
|
|
1556
|
+
setPhase("idle");
|
|
1557
|
+
setIncoming(null);
|
|
1558
|
+
setOutgoing(null);
|
|
1559
|
+
setActiveConversationId(null);
|
|
1560
|
+
setActiveCallId(null);
|
|
1561
|
+
setActiveMedia(null);
|
|
1562
|
+
setError(null);
|
|
1563
|
+
return;
|
|
1564
|
+
}
|
|
1551
1565
|
const conversationId = activeConversationId ?? incoming?.conversationId ?? outgoing?.conversationId;
|
|
1552
1566
|
const callId = activeCallId ?? incoming?.callId ?? outgoing?.callId;
|
|
1553
1567
|
try {
|
|
@@ -1596,6 +1610,7 @@ function useCalls(userId, opts = {}) {
|
|
|
1596
1610
|
decline,
|
|
1597
1611
|
cancel,
|
|
1598
1612
|
hangUp,
|
|
1613
|
+
reportOthersOnCall,
|
|
1599
1614
|
reset
|
|
1600
1615
|
};
|
|
1601
1616
|
}
|