whyuzeim 1.1.6 → 1.1.7

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.
@@ -297,8 +297,18 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
297
297
  var intervalId = _setInterval(function () {
298
298
  // 如果登录状态发生变化
299
299
  console.log("Agora login state:", agoraChatUikit.rootStore.loginState);
300
+ if (agoraChatUikit.rootStore.loginState) {
301
+ if (onLoginSuccess) {
302
+ onLoginSuccess();
303
+ }
304
+ }
300
305
  if (agoraChatUikit.rootStore.loginState && props.conversationId) {
301
306
  setLoading(!agoraChatUikit.rootStore.loginState);
307
+ if (!agoraChatUikit.rootStore.loginState) {
308
+ if (onLoginSuccess) {
309
+ onLoginSuccess();
310
+ }
311
+ }
302
312
  clearInterval(intervalId);
303
313
  initConversation();
304
314
  getHeaderInfo();
@@ -306,9 +316,6 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
306
316
  }, 1000); // 每秒检查一次
307
317
  // 设置定时器定期检查登录状态
308
318
  if (agoraChatUikit.rootStore.loginState) {
309
- if (onLoginSuccess) {
310
- onLoginSuccess();
311
- }
312
319
  clearInterval(intervalId);
313
320
  }
314
321
  // 清理函数
@@ -295,8 +295,18 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
295
295
  var intervalId = _setInterval(function () {
296
296
  // 如果登录状态发生变化
297
297
  console.log("Agora login state:", rootStore.loginState);
298
+ if (rootStore.loginState) {
299
+ if (onLoginSuccess) {
300
+ onLoginSuccess();
301
+ }
302
+ }
298
303
  if (rootStore.loginState && props.conversationId) {
299
304
  setLoading(!rootStore.loginState);
305
+ if (!rootStore.loginState) {
306
+ if (onLoginSuccess) {
307
+ onLoginSuccess();
308
+ }
309
+ }
300
310
  clearInterval(intervalId);
301
311
  initConversation();
302
312
  getHeaderInfo();
@@ -304,9 +314,6 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
304
314
  }, 1000); // 每秒检查一次
305
315
  // 设置定时器定期检查登录状态
306
316
  if (rootStore.loginState) {
307
- if (onLoginSuccess) {
308
- onLoginSuccess();
309
- }
310
317
  clearInterval(intervalId);
311
318
  }
312
319
  // 清理函数
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whyuzeim",
3
- "version": "1.1.6",
3
+ "version": "1.1.7",
4
4
  "description": "im componenets",
5
5
  "main": "cjs/index.js",
6
6
  "module": "es/index.js",