@qafka/react-native 2.1.0 → 2.1.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 +6 -0
- package/dist/QafkaSDK.js +14 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ and this project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.ht
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [2.1.1] — 2026-06-03
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- Chat surface could get stuck on the loading indicator (greeting + typing dots, no input) after navigating away from the chat screen and returning to it. Re-entering an already-initialized SDK now reports the ready state to the new mount, and tearing down a superseded instance no longer clears a newer live one.
|
|
15
|
+
|
|
10
16
|
## [2.0.0] — 2026-05-17
|
|
11
17
|
|
|
12
18
|
Initial public release. See [README.md](./README.md) for the full feature list and installation instructions.
|
package/dist/QafkaSDK.js
CHANGED
|
@@ -47,6 +47,14 @@ class QafkaSDK {
|
|
|
47
47
|
if (currentApiKey === newApiKey &&
|
|
48
48
|
currentSubProjectId === newSubProjectId &&
|
|
49
49
|
currentProjectId === newProjectId) {
|
|
50
|
+
// Already initialized with an identical config. A second component
|
|
51
|
+
// mount shares this singleton — the host can re-enter or re-push the
|
|
52
|
+
// chat screen via forward navigation before the previous instance has
|
|
53
|
+
// finished tearing down. Re-running init is unnecessary, but we MUST
|
|
54
|
+
// still notify this caller's status listener; otherwise its local
|
|
55
|
+
// `sdkReady` never flips true and the UI stalls on the loading gate
|
|
56
|
+
// with the input hidden.
|
|
57
|
+
config.onStatusChange?.('ready');
|
|
50
58
|
return;
|
|
51
59
|
}
|
|
52
60
|
await this.destroy();
|
|
@@ -457,7 +465,12 @@ class QafkaSDK {
|
|
|
457
465
|
this.config = null;
|
|
458
466
|
this.themePrefetchPromise = null;
|
|
459
467
|
this.status = 'uninitialized';
|
|
460
|
-
|
|
468
|
+
// Only clear the shared singleton slot when WE are still the current
|
|
469
|
+
// instance. An outgoing component unmounting must not null a newer
|
|
470
|
+
// instance that a freshly mounted component already created/initialized.
|
|
471
|
+
if (QafkaSDK.instance === this) {
|
|
472
|
+
QafkaSDK.instance = null;
|
|
473
|
+
}
|
|
461
474
|
}
|
|
462
475
|
}
|
|
463
476
|
exports.QafkaSDK = QafkaSDK;
|
package/package.json
CHANGED