@jetthai/cuora 1.1.387 → 1.1.388

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 CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.1.388](https://github.com/jetthai/cuora-module/compare/v1.1.387...v1.1.388) (2025-10-07)
6
+
5
7
  ### [1.1.387](https://github.com/jetthai/cuora-module/compare/v1.1.386...v1.1.387) (2025-09-23)
6
8
 
7
9
  ### [1.1.386](https://github.com/jetthai/cuora-module/compare/v1.1.385...v1.1.386) (2025-09-19)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.387",
3
+ "version": "1.1.388",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -41,6 +41,7 @@ export default function (request) {
41
41
  defaultAffiliateCode: null,
42
42
  friendCode: null,
43
43
  isPlaying: false,
44
+ isLogin: false,
44
45
  },
45
46
  states: {
46
47
  config: {
@@ -88,8 +89,20 @@ export default function (request) {
88
89
  },
89
90
  },
90
91
  feed: {
91
- initial: 'updating',
92
+ initial: 'idle',
92
93
  states: {
94
+ idle: {
95
+ on: {
96
+ LOGIN_REFRESH: {
97
+ target: 'updating',
98
+ actions: 'login',
99
+ },
100
+ LEAVE_GAME_REFRESH: {
101
+ target: 'updating',
102
+ actions: 'leaveGame',
103
+ },
104
+ },
105
+ },
93
106
  updating: {
94
107
  invoke: {
95
108
  src: 'fetchFeeds',
@@ -110,11 +123,12 @@ export default function (request) {
110
123
  },
111
124
  on: {
112
125
  ENTER_GAME_PAUSE: {
126
+ target: '.idle',
113
127
  actions: 'resetByEnterGame',
114
128
  },
115
- LEAVE_GAME_REFRESH: {
116
- target: '.updating',
117
- actions: 'leaveGame',
129
+ LOGOUT_PAUSE: {
130
+ target: '.idle',
131
+ actions: 'resetByLogout',
118
132
  },
119
133
  },
120
134
  },
@@ -296,7 +310,7 @@ export default function (request) {
296
310
  const { broadcastList, mailBoxInfo } = event.data
297
311
  const { siteConfig } = context
298
312
  const customerMessageEnable = siteConfig?.csChat?.some((item) => item.enable && item.name === 'customermessage')
299
- if (!customerMessageEnable) {
313
+ if (!customerMessageEnable && mailBoxInfo) {
300
314
  mailBoxInfo.rows -= mailBoxInfo.detailRows?.CUSTOMER || 0
301
315
  }
302
316
  return { broadcastList, mailBoxInfo }
@@ -334,6 +348,19 @@ export default function (request) {
334
348
  isPlaying: false,
335
349
  }
336
350
  }),
351
+ resetByLogout: assign((context, event) => {
352
+ return {
353
+ isLogin: false,
354
+ broadcastList: null,
355
+ mailBoxInfo: null,
356
+ promotions: null,
357
+ }
358
+ }),
359
+ login: assign((context, event) => {
360
+ return {
361
+ isLogin: true,
362
+ }
363
+ }),
337
364
  },
338
365
  guards: {
339
366
  isAffiliateCodeInstructionsEnable: (context, event) => {