stream-chat 9.50.0 → 9.50.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/dist/cjs/index.browser.js +5 -4
- package/dist/cjs/index.browser.js.map +2 -2
- package/dist/cjs/index.node.js +5 -4
- package/dist/cjs/index.node.js.map +2 -2
- package/dist/esm/index.mjs +5 -4
- package/dist/esm/index.mjs.map +2 -2
- package/dist/types/thread_manager.d.ts +7 -0
- package/package.json +1 -1
- package/src/thread_manager.ts +11 -3
package/dist/esm/index.mjs
CHANGED
|
@@ -12423,6 +12423,7 @@ var DEFAULT_CONNECTION_RECOVERY_THROTTLE_DURATION = 1e3;
|
|
|
12423
12423
|
var MAX_QUERY_THREADS_LIMIT = 25;
|
|
12424
12424
|
var THREAD_MANAGER_INITIAL_STATE = {
|
|
12425
12425
|
active: false,
|
|
12426
|
+
wasActivatedAtLeastOnce: false,
|
|
12426
12427
|
isThreadOrderStale: false,
|
|
12427
12428
|
threads: [],
|
|
12428
12429
|
unreadThreadCount: 0,
|
|
@@ -12445,7 +12446,7 @@ var ThreadManager = class extends WithSubscriptions {
|
|
|
12445
12446
|
this.state.next(THREAD_MANAGER_INITIAL_STATE);
|
|
12446
12447
|
};
|
|
12447
12448
|
this.activate = () => {
|
|
12448
|
-
this.state.partialNext({ active: true });
|
|
12449
|
+
this.state.partialNext({ active: true, wasActivatedAtLeastOnce: true });
|
|
12449
12450
|
};
|
|
12450
12451
|
this.deactivate = () => {
|
|
12451
12452
|
this.state.partialNext({ active: false });
|
|
@@ -12525,8 +12526,8 @@ var ThreadManager = class extends WithSubscriptions {
|
|
|
12525
12526
|
}).unsubscribe;
|
|
12526
12527
|
const throttledHandleConnectionRecovered = throttle(
|
|
12527
12528
|
() => {
|
|
12528
|
-
const { lastConnectionDropAt } = this.state.getLatestValue();
|
|
12529
|
-
if (!lastConnectionDropAt) return;
|
|
12529
|
+
const { lastConnectionDropAt, wasActivatedAtLeastOnce } = this.state.getLatestValue();
|
|
12530
|
+
if (!lastConnectionDropAt || !wasActivatedAtLeastOnce) return;
|
|
12530
12531
|
this.reload({ force: true });
|
|
12531
12532
|
},
|
|
12532
12533
|
DEFAULT_CONNECTION_RECOVERY_THROTTLE_DURATION,
|
|
@@ -14658,7 +14659,7 @@ var StreamChat = class _StreamChat {
|
|
|
14658
14659
|
return this.userAgent;
|
|
14659
14660
|
}
|
|
14660
14661
|
if (!this.cachedUserAgent) {
|
|
14661
|
-
const version = "9.50.
|
|
14662
|
+
const version = "9.50.1";
|
|
14662
14663
|
const { name: sdkName, version: sdkVersion } = this.sdkIdentifier ?? {};
|
|
14663
14664
|
const { name: appName, version: appVersion } = this.appIdentifier ?? {};
|
|
14664
14665
|
const { os, model: deviceModel } = this.deviceIdentifier ?? {};
|