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-07-12 10:19:32 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
cfe228fc0fb6e445a8182650a3d80e9634e9c289
cfe228fc
1 parent
d833e6d5
ref |> 完善直播IM置顶,取消置顶、上墙消息
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
21 deletions
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/TabLiveComponent.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/TabLiveComponent.ets
View file @
cfe228f
...
...
@@ -10,7 +10,7 @@ import { LiveViewModel } from '../../viewModel/LiveViewModel'
import { Logger } from 'wdKit'
import LoadMoreLayout from 'wdComponent/src/main/ets/components/page/LoadMoreLayout'
import { PeopleShipNoMoreData } from 'wdComponent/src/main/ets/components/reusable/PeopleShipNoMoreData'
import { LiveMessageOptType } from 'wdBean/src/main/ets/bean/live/LiveRoomBean'
import { LiveMessage
IsHistoryMessage, LiveMessage
OptType } from 'wdBean/src/main/ets/bean/live/LiveRoomBean'
import { ArrayList } from '@kit.ArkTS'
const TAG: string = 'TabLiveComponent';
...
...
@@ -40,36 +40,34 @@ export struct TabLiveComponent {
case LiveMessageOptType.ZH_UPDATE_MSG: {
const index = this.liveViewModel.getLiveRoomItemBeanIndex(this.lastInputedComment, this.liveList)
this.liveList.updateItem(this.lastInputedComment, index)
return
}
break
} break
case LiveMessageOptType.ZH_DELETE_MSG: {
const index = this.liveViewModel.getLiveRoomItemBeanIndex(this.lastInputedComment, this.liveList)
this.liveList.deleteItem(index);
return
}
break
} break
case LiveMessageOptType.ZH_TOP_MSG:
case LiveMessageOptType.ZH_UN_TOP_MSG:
case LiveMessageOptType.ZH_WALL_MSG:
case LiveMessageOptType.ZH_WALL_MSG: {
this.sortLiveRoomItemBean()
} break
default: {
let datas: LazyDataSource<LiveRoomItemBean> =
this.liveViewModel.sortLiveRoomItemBean(this.lastInputedComment, this.liveList)
this.liveList.replaceAll()
this.liveList.addItems(datas.getDataArray())
return
}
break
let optType = this.lastInputedComment.optionType != undefined ? this.lastInputedComment.optionType : this.lastInputedComment.dataType
if (LiveMessageIsHistoryMessage(optType)) {
this.sortLiveRoomItemBean()
}
} break
}
if (this.liveList.totalCount() === 0) {
this.liveList.push(this.liveViewModel.deepCopyLiveRoomItem(this.lastInputedComment))
} else {
this.liveList.addFirstItem(this.liveViewModel.deepCopyLiveRoomItem(this.lastInputedComment))
}
// if (this.liveList.totalCount() === 0) {
// this.liveList.push(this.liveViewModel.deepCopyLiveRoomItem(this.lastInputedComment))
// } else {
// this.liveList.addFirstItem(this.liveViewModel.deepCopyLiveRoomItem(this.lastInputedComment))
// }
this.pageModel.viewType = ViewType.LOADED;
}
build() {
Stack() {
if (this.pageModel.viewType == ViewType.LOADING) {
...
...
@@ -215,7 +213,11 @@ export struct TabLiveComponent {
})
}
sortLiveRoomItemBean() {
let datas: LazyDataSource<LiveRoomItemBean> = this.liveViewModel.sortLiveRoomItemBean(this.lastInputedComment, this.liveList)
this.liveList.replaceAll()
this.liveList.addItems(datas.getDataArray())
}
updateLiveListData() {
let liveRoomItemBeanTemp: LiveRoomItemBean = {} as LiveRoomItemBean
liveRoomItemBeanTemp.text = this.contentDetailData.newIntroduction
...
...
Please
register
or
login
to post a comment