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-10 18:26:09 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
159c2fb2913e8800a7fd34671e2ed37d5a8aee5c
159c2fb2
1 parent
75ed89cf
ref |> 对接直播编辑和删除直播间IM消息
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
4 deletions
sight_harmony/features/wdBean/src/main/ets/bean/live/LiveRoomBean.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/viewModel/LiveViewModel.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/TabLiveComponent.ets
sight_harmony/features/wdBean/src/main/ets/bean/live/LiveRoomBean.ets
View file @
159c2fb
...
...
@@ -7,6 +7,8 @@ export interface LiveRoomBean {
}
export interface LiveRoomItemBean {
// 消息id
id: string
text: string
senderUserAvatarUrl: string
senderUserName: string
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/viewModel/LiveViewModel.ets
View file @
159c2fb
...
...
@@ -10,7 +10,7 @@ import {
import { LiveMessageIsHistoryMessage } from 'wdBean/src/main/ets/bean/live/LiveRoomBean'
import { SpConstants } from 'wdConstant'
import { ContentDetailRequest } from 'wdDetailPlayApi/Index'
import { Logger, SPHelper } from 'wdKit/Index'
import { L
azyDataSource, L
ogger, SPHelper } from 'wdKit/Index'
import { ToastUtils } from 'wdKit/src/main/ets/utils/ToastUtils'
import { HttpUtils, ResponseDTO } from 'wdNetwork/Index'
import { LiveModel } from './LiveModel'
...
...
@@ -231,4 +231,15 @@ export class LiveViewModel {
}
return mySelf
}
getLiveRoomItemBeanIndex(liveRoomItemBean:LiveRoomItemBean, dataSource:LazyDataSource<LiveRoomItemBean>):number {
let index = 0
for (let i = dataSource.totalCount() - 1; i >= 0; i--) {
const currentLiveRoomBean = dataSource.get(i);
if (currentLiveRoomBean.id == liveRoomItemBean.id) {
index = i
}
}
return index
}
}
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/TabLiveComponent.ets
View file @
159c2fb
...
...
@@ -37,11 +37,16 @@ export struct TabLiveComponent {
Logger.debug(TAG, "1显示评论》》》: " + JSON.stringify(this.lastInputedComment))
switch (this.lastInputedComment.optionType) {
case LiveMessageOptType.ZH_UPDATE_MSG: {
const index = this.liveViewModel.getLiveRoomItemBeanIndex(this.lastInputedComment,this.liveList)
this.liveList.updateItem(this.lastInputedComment,index)
return
} break
case LiveMessageOptType.ZH_DELETE_MSG: {
} break
const index = this.liveViewModel.getLiveRoomItemBeanIndex(this.lastInputedComment,this.liveList)
this.liveList.deleteItem(index);
return
}
break
case LiveMessageOptType.ZH_TOP_MSG: {
} break
...
...
Please
register
or
login
to post a comment