@jetthai/cuora 1.1.368 → 1.1.370
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 +4 -0
- package/package.json +1 -1
- package/src/machine/inbox.js +13 -7
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
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.370](https://github.com/jetthai/cuora-module/compare/v1.1.369...v1.1.370) (2025-08-07)
|
|
6
|
+
|
|
7
|
+
### [1.1.369](https://github.com/jetthai/cuora-module/compare/v1.1.368...v1.1.369) (2025-08-06)
|
|
8
|
+
|
|
5
9
|
### [1.1.368](https://github.com/jetthai/cuora-module/compare/v1.1.367...v1.1.368) (2025-07-28)
|
|
6
10
|
|
|
7
11
|
### [1.1.367](https://github.com/jetthai/cuora-module/compare/v1.1.366...v1.1.367) (2025-07-22)
|
package/package.json
CHANGED
package/src/machine/inbox.js
CHANGED
|
@@ -292,7 +292,6 @@ export default function (request) {
|
|
|
292
292
|
}
|
|
293
293
|
}),
|
|
294
294
|
resetPage: assign((context, event) => {
|
|
295
|
-
console.log('updateMessage resetPage')
|
|
296
295
|
const { inbox, currentTab } = JSON.parse(JSON.stringify(context))
|
|
297
296
|
inbox[currentTab].page = -1
|
|
298
297
|
return {
|
|
@@ -424,7 +423,7 @@ export default function (request) {
|
|
|
424
423
|
fetchMessages: async (context, event) => {
|
|
425
424
|
const lang = context.lang
|
|
426
425
|
const { isRewardListEnable, currentTab, inbox } = JSON.parse(JSON.stringify(context))
|
|
427
|
-
if (isRewardListEnable && (currentTab === 'REWARD' || currentTab === 'DIAMOND')) {
|
|
426
|
+
if (isRewardListEnable && (currentTab === 'REWARD' || currentTab === 'DIAMOND' || currentTab === 'FREE_GAME')) {
|
|
428
427
|
const { data } = await request.send(activity.getRewardList({ count: 30, appSecret, lang }))
|
|
429
428
|
inbox[currentTab] = { data, page: 0, totalPage: 1 }
|
|
430
429
|
} else {
|
|
@@ -437,11 +436,18 @@ export default function (request) {
|
|
|
437
436
|
return inbox
|
|
438
437
|
},
|
|
439
438
|
reFetchMessages: async (context, event) => {
|
|
440
|
-
const
|
|
441
|
-
const {
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
439
|
+
const lang = context.lang
|
|
440
|
+
const { isRewardListEnable, currentTab, inbox } = JSON.parse(JSON.stringify(context))
|
|
441
|
+
|
|
442
|
+
if (isRewardListEnable && (currentTab === 'REWARD' || currentTab === 'DIAMOND' || currentTab === 'FREE_GAME')) {
|
|
443
|
+
const { data } = await request.send(activity.getRewardList({ count: 30, appSecret, lang }))
|
|
444
|
+
inbox[currentTab] = { data, page: 0, totalPage: 1 }
|
|
445
|
+
} else {
|
|
446
|
+
const { data, ...rest } = await request.send(mailbox.getMessageList({ type: currentTab, page: 0 }))
|
|
447
|
+
let formattedData = []
|
|
448
|
+
formattedData = data?.map((item) => ({ ...item, isSelected: false }))
|
|
449
|
+
inbox[currentTab] = { data: formattedData, ...rest }
|
|
450
|
+
}
|
|
445
451
|
return inbox
|
|
446
452
|
},
|
|
447
453
|
updateMessageIsRead: async (context, event) => {
|