Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
wuyanan
2024-09-26 13:46:10 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d1464ee7ccf0ffc1761a0313fedb866276772f22
d1464ee7
1 parent
b9c87e7d
ref |>修复缺陷 18780-进入直播间,未评论,评论后,切换直播间,然后在切到大家聊后,数据消失
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
16 deletions
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/TabChatComponent.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/TabChatComponent.ets
View file @
d1464ee
...
...
@@ -34,6 +34,7 @@ export struct TabChatComponent {
updateData() {
if (this.index === this.parentComponentIndex && this.initUI) {
this.initUI = false
this.getLiveList()
}
...
...
@@ -87,7 +88,7 @@ export struct TabChatComponent {
this.ListLayout()
},
onRefresh: (resolve) => {
this.pageModel.currentPage
= 1
this.pageModel.currentPage
++
this.getLiveList(resolve)
},
...
...
@@ -136,7 +137,6 @@ export struct TabChatComponent {
return
}
this.pageModel.isLoading = true
this.pageModel.currentPage = 1
this.liveViewModel.getLiveChatList(
this.pageModel.currentPage,
this.contentDetailData?.liveInfo?.mlive?.mliveId,
...
...
@@ -152,34 +152,37 @@ export struct TabChatComponent {
resolve('')
}
}
if (this.pageModel.currentPage === 1) {
this.liveChatList.clear()
}
// if (this.pageModel.currentPage === 1) {
// this.liveChatList.clear()
// }
Logger.debug(TAG, `${JSON.stringify(data)}`)
if (data.barrageResponses && data.barrageResponses.length > 0) {
this.pageModel.viewType = ViewType.LOADED;
this.liveChatList.push(...data.barrageResponses)
if (this.initUI) {
this.initUI = false
if (this.pageModel.currentPage === 1) {
setTimeout(() => {
this.scroller.scrollToIndex(this.liveChatList.totalCount() - 1)
}, 300)
}
if (data.barrageResponses.length === this.pageModel.pageSize) {
this.pageModel.currentPage++;
this.pageModel.hasMore = true;
} else {
this.pageModel.hasMore = false;
}
// this.pageModel.currentPage++;
// if (data.barrageResponses.length === this.pageModel.pageSize) {
//
// this.pageModel.hasMore = true;
// } else {
// this.pageModel.hasMore = false;
// }
} else {
this.pageModel.viewType = ViewType.EMPTY;
if (this.liveChatList.totalCount() == 0 ) {
this.pageModel.viewType = ViewType.EMPTY;
}
}
},
() => {
Logger.debug(TAG, `error`)
this.pageModel.viewType = ViewType.ERROR;
if (this.liveChatList.totalCount() == 0) {
this.pageModel.viewType = ViewType.ERROR;
}
})
}
...
...
Please
register
or
login
to post a comment