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/cjs/index.node.js
CHANGED
|
@@ -12607,6 +12607,7 @@ var DEFAULT_CONNECTION_RECOVERY_THROTTLE_DURATION = 1e3;
|
|
|
12607
12607
|
var MAX_QUERY_THREADS_LIMIT = 25;
|
|
12608
12608
|
var THREAD_MANAGER_INITIAL_STATE = {
|
|
12609
12609
|
active: false,
|
|
12610
|
+
wasActivatedAtLeastOnce: false,
|
|
12610
12611
|
isThreadOrderStale: false,
|
|
12611
12612
|
threads: [],
|
|
12612
12613
|
unreadThreadCount: 0,
|
|
@@ -12629,7 +12630,7 @@ var ThreadManager = class extends WithSubscriptions {
|
|
|
12629
12630
|
this.state.next(THREAD_MANAGER_INITIAL_STATE);
|
|
12630
12631
|
};
|
|
12631
12632
|
this.activate = () => {
|
|
12632
|
-
this.state.partialNext({ active: true });
|
|
12633
|
+
this.state.partialNext({ active: true, wasActivatedAtLeastOnce: true });
|
|
12633
12634
|
};
|
|
12634
12635
|
this.deactivate = () => {
|
|
12635
12636
|
this.state.partialNext({ active: false });
|
|
@@ -12709,8 +12710,8 @@ var ThreadManager = class extends WithSubscriptions {
|
|
|
12709
12710
|
}).unsubscribe;
|
|
12710
12711
|
const throttledHandleConnectionRecovered = throttle(
|
|
12711
12712
|
() => {
|
|
12712
|
-
const { lastConnectionDropAt } = this.state.getLatestValue();
|
|
12713
|
-
if (!lastConnectionDropAt) return;
|
|
12713
|
+
const { lastConnectionDropAt, wasActivatedAtLeastOnce } = this.state.getLatestValue();
|
|
12714
|
+
if (!lastConnectionDropAt || !wasActivatedAtLeastOnce) return;
|
|
12714
12715
|
this.reload({ force: true });
|
|
12715
12716
|
},
|
|
12716
12717
|
DEFAULT_CONNECTION_RECOVERY_THROTTLE_DURATION,
|
|
@@ -14842,7 +14843,7 @@ var StreamChat = class _StreamChat {
|
|
|
14842
14843
|
return this.userAgent;
|
|
14843
14844
|
}
|
|
14844
14845
|
if (!this.cachedUserAgent) {
|
|
14845
|
-
const version = "9.50.
|
|
14846
|
+
const version = "9.50.1";
|
|
14846
14847
|
const { name: sdkName, version: sdkVersion } = this.sdkIdentifier ?? {};
|
|
14847
14848
|
const { name: appName, version: appVersion } = this.appIdentifier ?? {};
|
|
14848
14849
|
const { os, model: deviceModel } = this.deviceIdentifier ?? {};
|